home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pyth_os2.zip / python-1.0.2 / Demo / stdwin / TestCSplit.py < prev    next >
Text File  |  1992-10-02  |  465b  |  26 lines

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