File: layout_settings.py

package info (click to toggle)
python-guizero 1.1.1%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,676 kB
  • sloc: python: 6,286; makefile: 28; sh: 17
file content (26 lines) | stat: -rw-r--r-- 1,033 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from guizero import App, Box, ListBox, CheckBox, Combo, PushButton

app = App()

list_boxes = Box(app, width="fill")
ListBox(list_boxes, items=["Times New Roman", "Courier", "Verdana"], align="left", width="fill")
ListBox(list_boxes, items=["Regular", "Italic", "Bold", "Bold Italic"], align="left", width="fill")
ListBox(list_boxes, items=["8", "10", "12", "14", "16", "18"], align="left", width="fill")

combos = Box(app, width="fill")
combos.border = True
Combo(combos, options=["red", "green", "blue", "yellow"], align="left")
Combo(combos, options=["underline", "double underline"], align="right")

checks = Box(app, width="fill")
checks.border = True
CheckBox(checks, text="strike-through", align="left")
CheckBox(checks, text="double strike-through", align="left")
CheckBox(checks, text="sub-script", align="left")

buttons = Box(app, width="fill", align="bottom")
PushButton(buttons, text="Default", align="left")
PushButton(buttons, text="Ok", align="right")
PushButton(buttons, text="Cancel", align="right")

app.display()