Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from guizero import App, Text, TextBox, PushButton, Slider
- def say_my_name():
- welcome_message.value = my_name.value
- def change_text_size(slider_value):
- welcome_message.size = slider_value
- #app = App()
- #app.bg = "blue"
- #app.text_color = "yellow"
- app = App(title = "Hello GUI World", width=600, height=600)
- welcome_message = Text(app, text ="Welcome to my App", size = 20, font = "Arial", color="blue")
- my_name = TextBox(app, text = "Enter your name",width = 30)
- update_text = PushButton(app, command = say_my_name, text="Display your name")
- text_size = Slider(app, command=change_text_size, start=10,end=40)
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment