0
0
mirror of https://github.com/python/cpython.git synced 2024-11-30 18:51:15 +01:00
cpython/Demo/stdwin/FormTest.py

31 lines
658 B
Python
Raw Normal View History

1992-12-14 15:12:10 +01:00
#! /usr/local/bin/python
1992-03-30 12:54:51 +02:00
testlabels = 'Name', 'Address', 'City', 'Country', 'Comments'
def main():
import stdwin
from WindowParent import WindowParent, MainLoop
from FormSplit import FormSplit
from Buttons import Label
from TextEdit import TextEdit
#
stdwin.setdefscrollbars(0, 0)
#
w = WindowParent().create('FormTest', (0, 0))
f = FormSplit().create(w)
#
h, v = 0, 0
for label in testlabels:
f.placenext(h, v)
lbl = Label().definetext(f, label)
f.placenext(h + 100, v)
txt = TextEdit().createboxed(f, (40, 2), (2, 2))
#txt = TextEdit().create(f, (40, 2))
v = v + 2*stdwin.lineheight() + 10
#
w.realize()
#
MainLoop()
main()