Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # guizero - Variable-sized PushButtons
- from guizero import App, Text, PushButton
- app = App(title="Variable-sized PushButtons")
- app.font = "Piboto Condensed"
- app.text_size = 40
- app.bg = "floral white"
- # Function definitions go here.
- def one_act():
- button_one.disable()
- button_two.enable()
- def two_act():
- button_one.enable()
- button_two.disable()
- # GUI widgets & Set up event triggers
- button_one = PushButton(app, command=one_act, text="Button one" , align = "left" , width = "fill")
- button_two = PushButton(app, command=two_act, text="Button two", align = "right" , height = "fill", enabled=False)
- button_one.bg = "dark turquoise"
- button_two.bg = "light blue"
- # Show the GUI on the screen, start listening to events.
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement