Tom_Jung

Untitled

Mar 25th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1.  
  2. from guizero import App, Text, TextBox, PushButton, Slider
  3. def say_my_name():
  4. welcome_message.value = my_name.value
  5.  
  6. def change_text_size(slider_value):
  7. welcome_message.size = slider_value
  8.  
  9. #app = App()
  10. #app.bg = "blue"
  11. #app.text_color = "yellow"
  12.  
  13. app = App(title = "Hello GUI World", width=600, height=600)
  14.  
  15. welcome_message = Text(app, text ="Welcome to my App", size = 20, font = "Arial", color="blue")
  16. my_name = TextBox(app, text = "Enter your name",width = 30)
  17. update_text = PushButton(app, command = say_my_name, text="Display your name")
  18. text_size = Slider(app, command=change_text_size, start=10,end=40)
  19.  
  20. app.display()
Advertisement
Add Comment
Please, Sign In to add comment