File: TestFormSplit.py

package info (click to toggle)
python 1.5.1-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 11,592 kB
  • ctags: 32,695
  • sloc: ansic: 90,267; python: 73,993; makefile: 2,423; lisp: 2,097; sh: 702
file content (27 lines) | stat: -rwxr-xr-x 529 bytes parent folder | download | duplicates (4)
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
#! /usr/bin/env python

# TestFormSplit

import stdwin
from WindowParent import WindowParent, MainLoop
from Buttons import PushButton

def main(n):
	from FormSplit import FormSplit
	#
	stdwin.setdefscrollbars(1, 1)
	#
	the_window = WindowParent().create('TestFormSplit', (0, 0))
	the_form = FormSplit().create(the_window)
	#
	for i in range(n):
		if i % 3 == 0:
			the_form.placenext(i*40, 0)
		the_child = PushButton().define(the_form)
		the_child.settext('XXX-' + `i` + '-YYY')
	#
	the_window.realize()
	#
	MainLoop()

main(6)