demos/11_fixedlayout.py
author Radek Brich <radek.brich@devl.cz>
Sun, 22 Feb 2015 09:53:13 +0100
changeset 119 dd91747504dd
parent 118 8c7970520632
permissions -rwxr-xr-x
Redraw widgets on request. Add scrollbar demo.

#!/usr/bin/env python3

from tuikit.core.application import Application
from tuikit.widgets.button import Button

app = Application()
app.add(Button('left=0'), left=0)
app.add(Button('left=5'), left=5, top=2)
app.add(Button('right=0'), right=0)
app.add(Button('right=5'), right=5, top=2)
app.add(Button('center=x'), center='x', top=3)
app.add(Button('center=x, left=5'), center='x', left=5, top=5)
app.add(Button('center=x, right=5'), center='x', right=5, top=7)
app.add(Button('center=xy'), center='xy')
app.add(Button('fill=x'), fill='x', top=9)
app.add(Button('fill=x, left=5'), fill='x', left=5, top=11)
app.add(Button('fill=x, right=5'), fill='x', right=5, top=13)
app.add(Button('fill=x, left=5, right=5'), fill='x', left=5, right=5, top=15)

app.window_manager.sig_keypress.connect(lambda ev: app.stop())
app.start()