From a19a216bc60160c162e616145ef091dd18ce4e61 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Tue, 16 Feb 2021 14:40:46 -0600 Subject: Python 0.9.1 as posted in alt.sources --- lib/TestCSplit.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/TestCSplit.py (limited to 'lib/TestCSplit.py') diff --git a/lib/TestCSplit.py b/lib/TestCSplit.py new file mode 100644 index 0000000..b638f81 --- /dev/null +++ b/lib/TestCSplit.py @@ -0,0 +1,26 @@ +# TestCSplit + +import stdwin +from stdwinevents import WE_CLOSE +from WindowParent import WindowParent +from Buttons import PushButton + +def main(n): + from CSplit import CSplit + + the_window = WindowParent().create('TestCSplit', (0, 0)) + the_csplit = CSplit().create(the_window) + + for i in range(n): + the_child = PushButton().define(the_csplit) + the_child.settext(`(i+n-1)%n+1`) + + the_window.realize() + + while 1: + the_event = stdwin.getevent() + if the_event[0] = WE_CLOSE: break + the_window.dispatch(the_event) + the_window.destroy() + +main(12) -- cgit v1.2.3