質問

Will i have to create a new window everytime this label changes or can i just edit when it needs to. I have a program that keeps track of the things they get right and the total total and current_score in a GUI. for example label = Gtk.Label("you have %s out of %s", current_score, total the user will input something to check if it is right and if it is it will add to the current_score and total. Is there a way to do it??

役に立ちましたか?

解決

Not sure if I understood correctly, anyhow:

label = Gtk.Label("some text")
label.set_text("some other text")

http://lazka.github.io/pgi-docs/api/Gtk_3.0/classes/Label.html#Gtk.Label.set_text

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top