File: 00_layout.py

package info (click to toggle)
sqlkit 0.9.5-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,184 kB
  • sloc: python: 17,477; sql: 166; makefile: 95; xml: 23; sh: 11
file content (35 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""Bricks/gtk.Layout


"""
import gtk

lay = """
   LS=a
"""

l = Layout(lay, opts="T")

w = l.show()
e = gtk.Entry()

def drag_begin_cb(*args):
    print 'BEGIN'
    
def drag_end_cb(*args):
    dbg.write('END')
    
def drag_motion_cb(*args):
    dbg.write('MOTION')
    

lay = w['Lay=a']
lay.connect("drag_begin", drag_begin_cb)
lay.connect("drag_end",   drag_end_cb)
lay.connect("drag_motion",drag_motion_cb)

w['Lay=a'].put(e, 50,50)
l.prop('Lay=a', 'width-request', 300)
l.prop('Lay=a', 'height-request', 300)
e.show()