File: resize_picture_button.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 (16 lines) | stat: -rw-r--r-- 457 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from guizero import App, PushButton, Slider, info

def resize():
    button.width = width.value
    button.height = height.value

app = App()
button = PushButton(app, image="guizero.gif", command=info, args=["button", "you push the button"])

width = Slider(app, start = 10, end = button.width, command = resize)
width.value = button.width

height = Slider(app, start = 10, end = button.height, command = resize)
height.value = button.height

app.display()