44import clr
55
66import System
7+ clr .AddReference ("System.Windows.Forms" )
78import System .Windows .Forms as WinForms
89
910from System .Drawing import Color , Size , Point
@@ -14,6 +15,7 @@ class Splitter(WinForms.Form):
1415 'Creating a Multipane User Interface with Windows Forms'."""
1516
1617 def __init__ (self ):
18+ super ().__init__ ()
1719
1820 # Create an instance of each control being used.
1921 self .components = System .ComponentModel .Container ()
@@ -26,13 +28,13 @@ def __init__(self):
2628
2729 # Set properties of TreeView control.
2830 self .treeView1 .Dock = WinForms .DockStyle .Left
29- self .treeView1 .Width = self .ClientSize .Width / 3
31+ self .treeView1 .Width = self .ClientSize .Width // 3
3032 self .treeView1 .TabIndex = 0
3133 self .treeView1 .Nodes .Add ("TreeView" )
3234
3335 # Set properties of ListView control.
3436 self .listView1 .Dock = WinForms .DockStyle .Top
35- self .listView1 .Height = self .ClientSize .Height * 2 / 3
37+ self .listView1 .Height = self .ClientSize .Height * 2 // 3
3638 self .listView1 .TabIndex = 0
3739 self .listView1 .Items .Add ("ListView" )
3840
@@ -52,7 +54,7 @@ def __init__(self):
5254 self .splitter2 .TabIndex = 1
5355
5456 # Set TabStop to false for ease of use when negotiating UI.
55- self .splitter2 .TabStop = 0
57+ self .splitter2 .TabStop = False
5658
5759 # Set properties of Form's Splitter control.
5860 self .splitter1 .Location = System .Drawing .Point (121 , 0 )
@@ -61,7 +63,7 @@ def __init__(self):
6163 self .splitter1 .TabIndex = 1
6264
6365 # Set TabStop to false for ease of use when negotiating UI.
64- self .splitter1 .TabStop = 0
66+ self .splitter1 .TabStop = False
6567
6668 # Add the appropriate controls to the Panel.
6769 for item in (self .richTextBox1 , self .splitter2 , self .listView1 ):
0 commit comments