Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # worlds worst GUI by colin
- # how NOT to make a GUI
- from guizero import App, Text, Combo, PushButton
- from string import ascii_letters
- app = App("It' all gone wrong", bg = "dark green")
- def flash_text():
- if title.visible:
- title.hide()
- else:
- title.show()
- def are_you_sure():
- if app.yesno("Confirmation", "Are you sure?"):
- app.info("Thanks", "Button pressed")
- else:
- app.error("Ok", "Cancelling")
- title = Text(app, text= "Some hard text to read", size = "14", font = "Comic Sans", color = "green")
- a_letter = Combo(app, options = " " + ascii_letters, align ="left")
- b_letter = Combo(app, options = " " + ascii_letters, align ="left")
- c_letter = Combo(app, options = " " + ascii_letters, align ="left")
- d_letter = Combo(app, options = " " + ascii_letters, align ="left")
- e_letter = Combo(app, options = " " + ascii_letters, align ="left")
- button = PushButton(app, command = are_you_sure)
- app.warn("Application started", "Well done you started the applicatioon")
- app.repeat(1000, flash_text)
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement