home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pyos2bin.zip / Demo / stdwin / TestFormSplit.py < prev    next >
Text File  |  1996-11-27  |  529b  |  28 lines

  1. #! /usr/bin/env python
  2.  
  3. # TestFormSplit
  4.  
  5. import stdwin
  6. from WindowParent import WindowParent, MainLoop
  7. from Buttons import PushButton
  8.  
  9. def main(n):
  10.     from FormSplit import FormSplit
  11.     #
  12.     stdwin.setdefscrollbars(1, 1)
  13.     #
  14.     the_window = WindowParent().create('TestFormSplit', (0, 0))
  15.     the_form = FormSplit().create(the_window)
  16.     #
  17.     for i in range(n):
  18.         if i % 3 == 0:
  19.             the_form.placenext(i*40, 0)
  20.         the_child = PushButton().define(the_form)
  21.         the_child.settext('XXX-' + `i` + '-YYY')
  22.     #
  23.     the_window.realize()
  24.     #
  25.     MainLoop()
  26.  
  27. main(6)
  28.