from guizero import App, Text, ButtonGroup, Combo, PushButton, TextBox, Box app = App(title='Make a hectic hero', bg='yellow', layout='auto') # Function def make_hero_name(): adjective = cmb_adjective.value colour = txt_colour.value animal = btg_animal.value hero = adjective +" "+ colour +" "+ animal lbl_ouput.value = "You are... The " + hero + "." message1 = Text(app, text='Choose an adjective...', size=12, font='Arial', color='blue') cmb_adjective = Combo(app, options=["Amazing", "Bony", "Outgoing", "Funky, Bravely", "Strong"],selected="Amazing", width=15) message2 = Text(app, text='Enter a color', size=12, font='Arial', color='green') txt_colour = TextBox(app) box1 = Box(app, width='fill') message3 = Text(box1, text='Pick an animal', size=12, font='Arial') btg_animal = ButtonGroup(box1, options=["Aardvark", "Cat", "Dolphin", "Dog", "Tiger", "Velocipraptor"], selected="Aardvark", width=20) box1.bg = 'red' btn_make_name = PushButton(app, text='Make me a hero', width='35', height='1', command=make_hero_name,) btn_make_name.bg ='white' btn_make_name.text_size = '16' box2 = Box(app, width='fill', height='fill') lbl_ouput = Text(box2, text="A hero name will appear here", color='blue') lbl_ouput.font = 'Verdana' box2.bg = "gray" box2.text_size = 16 app.display()