mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			531 B
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			531 B
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
#! /usr/local/bin/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)
 |