File: app_resize.py

package info (click to toggle)
python-guizero 1.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,828 kB
  • sloc: python: 6,744; makefile: 28; sh: 17
file content (15 lines) | stat: -rw-r--r-- 301 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from guizero import App, Text, PushButton

def update_size(e):
    app_size.value = "{}.{}".format(e.width, e.height)

def resize():
    app.resize(700,1000)

app = App()
app_size = Text(app)
app.when_resized = update_size

resize_button = PushButton(app, text="resize", command=resize)

app.display()