Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This Python code is a basic demo of the GUI guizero
- # guizero works with tkinter but simpler with extra widgets eg. Slider
- # https://lawsie.github.io/guizero/slider/
- # firstgui.py
- from guizero import App, Text
- app = App( title="Hi there", bg = "#FFFF00", width = 700 )
- #---------------
- # create widgets .. specify some starting parameters
- firstmessage = Text(app, text="This is big text", color='red')
- secondmessage = Text(app, text="This is green")
- message3 = Text(app, text="This is message3 in font Times New Roman", font="Times New Roman")
- #-----------------------
- # adjust widget settings - using properties
- firstmessage.text_size = 40
- secondmessage.bg = "green"
- message3.text_size = 24
- message3.text_color = "cyan"
- message3.bg = 'magenta'
- #----------
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement