File: tk_widget.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 (24 lines) | stat: -rw-r--r-- 448 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from guizero import App, Box, Text
from tkinter import Spinbox
from tkinter.ttk import Progressbar

app = App(title="Using tk widgets")

Text(app, text="Spinbox")

# add a spinbox widget to the app
sp = Spinbox(from_=0, to=10)
app.add_tk_widget(sp)

Text(app, text="and Progressbar")

box = Box(app, border=True)

# add a progress bar to the boc
pb = Progressbar(box.tk)
box.add_tk_widget(pb)
pb.start()

Text(app, text="in guizero")

app.display()