demos/05_fixedlayout.py
changeset 118 8c7970520632
parent 117 8680c2333546
child 119 dd91747504dd
equal deleted inserted replaced
117:8680c2333546 118:8c7970520632
     1 #!/usr/bin/env python3
       
     2 
       
     3 from tuikit.core.application import Application
       
     4 from tuikit.widgets.button import Button
       
     5 
       
     6 app = Application()
       
     7 app.add(Button('left=0'), left=0)
       
     8 app.add(Button('left=5'), left=5, top=2)
       
     9 app.add(Button('right=0'), right=0)
       
    10 app.add(Button('right=5'), right=5, top=2)
       
    11 app.add(Button('center=x'), center='x', top=3)
       
    12 app.add(Button('center=x, left=5'), center='x', left=5, top=5)
       
    13 app.add(Button('center=x, right=5'), center='x', right=5, top=7)
       
    14 app.add(Button('center=xy'), center='xy')
       
    15 app.add(Button('fill=x'), fill='x', top=9)
       
    16 app.add(Button('fill=x, left=5'), fill='x', left=5, top=11)
       
    17 app.add(Button('fill=x, right=5'), fill='x', right=5, top=13)
       
    18 app.add(Button('fill=x, left=5, right=5'), fill='x', left=5, right=5, top=15)
       
    19 
       
    20 app.window_manager.sig_keypress.connect(lambda ev: app.stop())
       
    21 app.start()