1- # ===========================================================================
2- # This software is subject to the provisions of the Zope Public License,
3- # Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
4- # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
5- # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6- # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
7- # FOR A PARTICULAR PURPOSE.
8- # ===========================================================================
9-
101import clr
112import System .Windows .Forms as WinForms
123from System .Drawing import Color , Size , Point
@@ -28,7 +19,6 @@ def __init__(self):
2819 self .splitter2 = WinForms .Splitter ()
2920 self .panel1 = WinForms .Panel ()
3021
31-
3222 # Set properties of TreeView control.
3323 self .treeView1 .Dock = WinForms .DockStyle .Left
3424 self .treeView1 .Width = self .ClientSize .Width / 3
@@ -48,14 +38,14 @@ def __init__(self):
4838
4939 # Set properties of Panel's Splitter control.
5040 self .splitter2 .Dock = WinForms .DockStyle .Top
51-
41+
5242 # Width is irrelevant if splitter is docked to Top.
5343 self .splitter2 .Height = 3
54-
44+
5545 # Use a different color to distinguish the two splitters.
5646 self .splitter2 .BackColor = Color .Blue
5747 self .splitter2 .TabIndex = 1
58-
48+
5949 # Set TabStop to false for ease of use when negotiating UI.
6050 self .splitter2 .TabStop = 0
6151
@@ -67,7 +57,7 @@ def __init__(self):
6757
6858 # Set TabStop to false for ease of use when negotiating UI.
6959 self .splitter1 .TabStop = 0
70-
60+
7161 # Add the appropriate controls to the Panel.
7262 for item in (self .richTextBox1 , self .splitter2 , self .listView1 ):
7363 self .panel1 .Controls .Add (item )
@@ -87,12 +77,11 @@ def Dispose(self):
8777 WinForms .Form .Dispose (self )
8878
8979
90-
9180def main ():
9281 app = Splitter ()
9382 WinForms .Application .Run (app )
9483 app .Dispose ()
9584
85+
9686if __name__ == '__main__' :
9787 main ()
98-
0 commit comments