from guizero import App, TextBox, Text, Slider, PushButton, Picture, Combo, CheckBox, ButtonGroup, Box app = App(title="different sizes", width=700, height=700) text = Text(app, "lets change some sizes", width=20, height=2) text_box = TextBox(app, "some text", width=50) slider = Slider(app, width=300, height=30) button = PushButton(app, width=20, height=2) pic = Picture(app, image="guizero.gif", width=400, height=50) combo = Combo(app, ["martin", "laura", "rik"], width="fill", height="fill") check = CheckBox(app, "tick me", width=20, height=3) check.bg = "blue" button_group = ButtonGroup(app, ["cheese", "onion", "crisps"], 1, width=20, height=9) button_group.bg = "darkgrey" box = Box(app, width=100, height=100) box.border = True box.bg = "red" app.display()
a = App(title="colors") text = Text(a, text="colors") check = CheckBox(a, "check me") combo = Combo(a, ["red", "blue"]) button = PushButton(a) slider = Slider(a) textbox = TextBox(a, text="or colours") bgroup = ButtonGroup(a, ["cheese", "ham", "salad"], 1) a.bg = (255, 255, 0) text.text_color = "red" text.text_size = 30 text.font = "verdana" text.bg = "green" check.bg = "#d41789" combo.bg = "blue" combo.text_color = "green" combo.text_size = 24 button.bg = "black" button.text_color = (255, 0, 255) button.font = "arial" button.text_size = 18 slider.bg = (123, 234, 12) textbox.bg = "cyan" textbox.font = "courier" textbox.text_color = "#FF0000" bgroup.bg = "yellow" bgroup.text_color = "#e62112" bgroup.font = "book antiqua" a.display()