Mercurial > cpython-lru_cache-weakref
annotate Demo/stdwin/FormTest.py @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 73758db2f464 |
| children |
| rev | line source |
|---|---|
|
4573
73758db2f464
/usr/local/bin/python -> /usr/bin/env python
Guido van Rossum <guido@python.org>
parents:
1120
diff
changeset
|
1 #! /usr/bin/env 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() |
