Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from guizero import App, ButtonGroup, Combo, TextBox, PushButton, Text, info
- app = App(title="Hero-master")
- lbl_intro1= Text(app, text ='You can create hero name here')
- lbl_intro1.text_size = 25
- lbl_intro1.text_color= 'darkblue'
- def btn_go_clicked():
- info("Hero name created","Hero name is: " + txt_adj.value + " " + txt_color.value + " " + txt_animal.value + ".")
- lbl_adj = Text(app, text="What's your favorit character?")
- txt_adj = ButtonGroup(app, options= ["Generous", "Amazing", "Fearless", "Resistant", "Angry"])
- lbl_color = Text(app, text="What's your favorit color?")
- txt_color = TextBox(app)
- lbl_animal = Text(app, text="Select one of your favorit animal?")
- txt_animal = Combo(app, options=["Dragon", "Eagle", "Rabit", "Dog", "Elephant", "Lion", "Mouse", "Ant", "Bug", "Ladybird"])
- btn_go = PushButton(app, command=btn_go_clicked, text="Create")
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement