@@ -27,76 +27,89 @@ def __init__(self, *args, **kwds):
27
27
# begin wxGlade: BondLengthDialog.__init__
28
28
kwds ["style" ] = kwds .get ("style" , 0 ) | wx .DEFAULT_DIALOG_STYLE
29
29
wx .Dialog .__init__ (self , * args , ** kwds )
30
+ self .SetTitle ("Calculate Bond Lengths" )
31
+
32
+ sizer_2 = wx .StaticBoxSizer (wx .StaticBox (self , wx .ID_ANY , "" ), wx .VERTICAL )
33
+
30
34
self .instructionsLabel = wx .StaticText (self , wx .ID_ANY , "Enter the indices of two atoms." )
35
+ sizer_2 .Add (self .instructionsLabel , 0 , wx .ALL , 5 )
36
+
37
+ sizer_3 = wx .BoxSizer (wx .HORIZONTAL )
38
+ sizer_2 .Add (sizer_3 , 0 , wx .EXPAND , 0 )
39
+
31
40
self .indicesLabel = wx .StaticText (self , wx .ID_ANY , "Atom Indices" )
41
+ sizer_3 .Add (self .indicesLabel , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
42
+
32
43
self .aSpinCtrl = wx .SpinCtrl (self , wx .ID_ANY , "" , min = 0 , max = 100 , style = 0 )
44
+ self .aSpinCtrl .SetMinSize ((80 , 27 ))
45
+ sizer_3 .Add (self .aSpinCtrl , 0 , wx .ALL , 5 )
46
+
33
47
self .bSpinCtrl = wx .SpinCtrl (self , wx .ID_ANY , "" , min = 0 , max = 100 , style = 0 )
48
+ self .bSpinCtrl .SetMinSize ((80 , 27 ))
49
+ sizer_3 .Add (self .bSpinCtrl , 0 , wx .ALL , 5 )
50
+
34
51
self .static_line_2 = wx .StaticLine (self , wx .ID_ANY )
52
+ sizer_2 .Add (self .static_line_2 , 0 , wx .BOTTOM | wx .EXPAND , 5 )
53
+
35
54
self .instructionsLabel2 = wx .StaticText (self , wx .ID_ANY , "Or enter the elemental symbols of two atoms and\n the range over which to calculate the bond lengths." )
36
- self .elementLabel = wx .StaticText (self , wx .ID_ANY , "Elements" )
37
- self .aComboBox = wx .ComboBox (self , wx .ID_ANY , choices = [], style = 0 )
38
- self .bComboBox = wx .ComboBox (self , wx .ID_ANY , choices = [], style = 0 )
39
- self .rangeLabel = wx .StaticText (self , wx .ID_ANY , "Range" )
40
- self .lbTextCtrl = wx .TextCtrl (self , wx .ID_ANY , "" )
41
- self .toLabel = wx .StaticText (self , wx .ID_ANY , "to" )
42
- self .ubTextCtrl = wx .TextCtrl (self , wx .ID_ANY , "" )
43
- self .static_line_1 = wx .StaticLine (self , wx .ID_ANY )
44
- self .cancelButton = wx .Button (self , wx .ID_CANCEL , "Cancel" )
45
- self .okButton = wx .Button (self , wx .ID_OK , "OK" )
55
+ sizer_2 .Add (self .instructionsLabel2 , 0 , wx .ALL , 5 )
46
56
47
- self . __set_properties ( )
48
- self . __do_layout ( )
57
+ sizer_4 = wx . BoxSizer ( wx . HORIZONTAL )
58
+ sizer_2 . Add ( sizer_4 , 0 , wx . EXPAND , 0 )
49
59
50
- self .Bind (wx .EVT_SPINCTRL , self .onSpin , self .aSpinCtrl )
51
- self .Bind (wx .EVT_SPINCTRL , self .onSpin , self .bSpinCtrl )
52
- self .Bind (wx .EVT_BUTTON , self .onCancel , self .cancelButton )
53
- self .Bind (wx .EVT_BUTTON , self .onOk , self .okButton )
54
- # end wxGlade
55
- self .__customProperties ()
60
+ self .elementLabel = wx .StaticText (self , wx .ID_ANY , "Elements" )
61
+ sizer_4 .Add (self .elementLabel , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
56
62
57
- def __set_properties (self ):
58
- # begin wxGlade: BondLengthDialog.__set_properties
59
- self .SetTitle ("Calculate Bond Lengths" )
60
- self .aSpinCtrl .SetMinSize ((80 , 27 ))
61
- self .bSpinCtrl .SetMinSize ((80 , 27 ))
63
+ self .aComboBox = wx .ComboBox (self , wx .ID_ANY , choices = [], style = 0 )
62
64
self .aComboBox .SetMinSize ((80 , 27 ))
65
+ sizer_4 .Add (self .aComboBox , 0 , wx .ALL , 5 )
66
+
67
+ self .bComboBox = wx .ComboBox (self , wx .ID_ANY , choices = [], style = 0 )
63
68
self .bComboBox .SetMinSize ((80 , 27 ))
64
- self .lbTextCtrl .SetMinSize ((80 , 27 ))
65
- self .ubTextCtrl .SetMinSize ((80 , 27 ))
66
- # end wxGlade
69
+ sizer_4 .Add (self .bComboBox , 0 , wx .ALL , 5 )
67
70
68
- def __do_layout (self ):
69
- # begin wxGlade: BondLengthDialog.__do_layout
70
- sizer_2 = wx .StaticBoxSizer (wx .StaticBox (self , wx .ID_ANY , "" ), wx .VERTICAL )
71
- sizer_4_copy = wx .BoxSizer (wx .HORIZONTAL )
72
71
sizer_4_copy_1 = wx .BoxSizer (wx .HORIZONTAL )
73
- sizer_4 = wx .BoxSizer (wx .HORIZONTAL )
74
- sizer_3 = wx .BoxSizer (wx .HORIZONTAL )
75
- sizer_2 .Add (self .instructionsLabel , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
76
- sizer_3 .Add (self .indicesLabel , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
77
- sizer_3 .Add (self .aSpinCtrl , 0 , wx .ALL , 5 )
78
- sizer_3 .Add (self .bSpinCtrl , 0 , wx .ALL , 5 )
79
- sizer_2 .Add (sizer_3 , 0 , wx .EXPAND , 0 )
80
- sizer_2 .Add (self .static_line_2 , 0 , wx .BOTTOM | wx .EXPAND , 5 )
81
- sizer_2 .Add (self .instructionsLabel2 , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
82
- sizer_4 .Add (self .elementLabel , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
83
- sizer_4 .Add (self .aComboBox , 0 , wx .ALL , 5 )
84
- sizer_4 .Add (self .bComboBox , 0 , wx .ALL , 5 )
85
- sizer_2 .Add (sizer_4 , 0 , wx .EXPAND , 0 )
72
+ sizer_2 .Add (sizer_4_copy_1 , 0 , wx .EXPAND , 0 )
73
+
74
+ self .rangeLabel = wx .StaticText (self , wx .ID_ANY , "Range" )
86
75
sizer_4_copy_1 .Add (self .rangeLabel , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
76
+
77
+ self .lbTextCtrl = wx .TextCtrl (self , wx .ID_ANY , "" )
78
+ self .lbTextCtrl .SetMinSize ((80 , 27 ))
87
79
sizer_4_copy_1 .Add (self .lbTextCtrl , 0 , wx .ALL , 5 )
80
+
81
+ self .toLabel = wx .StaticText (self , wx .ID_ANY , "to" )
88
82
sizer_4_copy_1 .Add (self .toLabel , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
83
+
84
+ self .ubTextCtrl = wx .TextCtrl (self , wx .ID_ANY , "" )
85
+ self .ubTextCtrl .SetMinSize ((80 , 27 ))
89
86
sizer_4_copy_1 .Add (self .ubTextCtrl , 0 , wx .ALL , 5 )
90
- sizer_2 .Add (sizer_4_copy_1 , 0 , wx .EXPAND , 0 )
87
+
88
+ self .static_line_1 = wx .StaticLine (self , wx .ID_ANY )
91
89
sizer_2 .Add (self .static_line_1 , 0 , wx .EXPAND , 0 )
90
+
91
+ sizer_4_copy = wx .BoxSizer (wx .HORIZONTAL )
92
+ sizer_2 .Add (sizer_4_copy , 0 , wx .EXPAND , 0 )
93
+
92
94
sizer_4_copy .Add ((0 , 0 ), 1 , wx .EXPAND , 0 )
95
+
96
+ self .cancelButton = wx .Button (self , wx .ID_CANCEL , "Cancel" )
93
97
sizer_4_copy .Add (self .cancelButton , 0 , wx .ALL , 5 )
98
+
99
+ self .okButton = wx .Button (self , wx .ID_OK , "OK" )
94
100
sizer_4_copy .Add (self .okButton , 0 , wx .ALL , 5 )
95
- sizer_2 . Add ( sizer_4_copy , 0 , wx . EXPAND , 0 )
101
+
96
102
self .SetSizer (sizer_2 )
97
103
sizer_2 .Fit (self )
104
+
98
105
self .Layout ()
106
+
107
+ self .Bind (wx .EVT_SPINCTRL , self .onSpin , self .aSpinCtrl )
108
+ self .Bind (wx .EVT_SPINCTRL , self .onSpin , self .bSpinCtrl )
109
+ self .Bind (wx .EVT_BUTTON , self .onCancel , self .cancelButton )
110
+ self .Bind (wx .EVT_BUTTON , self .onOk , self .okButton )
99
111
# end wxGlade
112
+ self .__customProperties ()
100
113
101
114
def __customProperties (self ):
102
115
"""Set the custom properties."""
0 commit comments