@@ -27,76 +27,89 @@ def __init__(self, *args, **kwds):
2727 # begin wxGlade: BondLengthDialog.__init__
2828 kwds ["style" ] = kwds .get ("style" , 0 ) | wx .DEFAULT_DIALOG_STYLE
2929 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+
3034 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+
3140 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+
3243 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+
3347 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+
3451 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+
3554 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 )
4656
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 )
4959
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 )
5662
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 )
6264 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 )
6368 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 )
6770
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 )
7271 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" )
8675 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 ))
8779 sizer_4_copy_1 .Add (self .lbTextCtrl , 0 , wx .ALL , 5 )
80+
81+ self .toLabel = wx .StaticText (self , wx .ID_ANY , "to" )
8882 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 ))
8986 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 )
9189 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+
9294 sizer_4_copy .Add ((0 , 0 ), 1 , wx .EXPAND , 0 )
95+
96+ self .cancelButton = wx .Button (self , wx .ID_CANCEL , "Cancel" )
9397 sizer_4_copy .Add (self .cancelButton , 0 , wx .ALL , 5 )
98+
99+ self .okButton = wx .Button (self , wx .ID_OK , "OK" )
94100 sizer_4_copy .Add (self .okButton , 0 , wx .ALL , 5 )
95- sizer_2 . Add ( sizer_4_copy , 0 , wx . EXPAND , 0 )
101+
96102 self .SetSizer (sizer_2 )
97103 sizer_2 .Fit (self )
104+
98105 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 )
99111 # end wxGlade
112+ self .__customProperties ()
100113
101114 def __customProperties (self ):
102115 """Set the custom properties."""
0 commit comments