|
1120
|
1 #! /usr/local/bin/python
|
|
752
|
2
|
|
|
3 testlabels = 'Name', 'Address', 'City', 'Country', 'Comments'
|
|
|
4
|
|
|
5 def main():
|
|
|
6 import stdwin
|
|
|
7 from WindowParent import WindowParent, MainLoop
|
|
|
8 from FormSplit import FormSplit
|
|
|
9 from Buttons import Label
|
|
|
10 from TextEdit import TextEdit
|
|
|
11 #
|
|
|
12 stdwin.setdefscrollbars(0, 0)
|
|
|
13 #
|
|
|
14 w = WindowParent().create('FormTest', (0, 0))
|
|
|
15 f = FormSplit().create(w)
|
|
|
16 #
|
|
|
17 h, v = 0, 0
|
|
|
18 for label in testlabels:
|
|
|
19 f.placenext(h, v)
|
|
|
20 lbl = Label().definetext(f, label)
|
|
|
21 f.placenext(h + 100, v)
|
|
|
22 txt = TextEdit().createboxed(f, (40, 2), (2, 2))
|
|
|
23 #txt = TextEdit().create(f, (40, 2))
|
|
|
24 v = v + 2*stdwin.lineheight() + 10
|
|
|
25 #
|
|
|
26 w.realize()
|
|
|
27 #
|
|
|
28 MainLoop()
|
|
|
29
|
|
|
30 main()
|