- self.st_distance = wx.StaticText(self.pnl, label="Distance: ")
- self.te_distance = wx.TextCtrl(self.pnl, value="0", size=(140, -1))
-
- self.st_elevation = wx.StaticText(self.pnl, label="Elevation: ")
- self.te_elevation = wx.TextCtrl(self.pnl, value="0", size=(140, -1))
-
- self.st_fitness = wx.StaticText(self.pnl, label="Fitness: ")
- cb_fitness_choices = ['slow', 'average', 'fast']
- cb_fitness_default = 'average'
- self.cb_fitness = wx.ComboBox(self.pnl, choices=cb_fitness_choices,
- value=cb_fitness_default, style=wx.CB_READONLY)
-
- self.st_travel_mode = wx.StaticText(self.pnl, label="Travel Mode: ")
- cb_travel_mode_choices = ['uphill', 'flat', 'downhill', 'bushwhacking']
- cb_travel_mode_default = 'uphill'
- self.cb_travel_mode = wx.ComboBox(self.pnl, choices=cb_travel_mode_choices,
- value=cb_travel_mode_default, style=wx.CB_READONLY)
-
- self.st_units = wx.StaticText(self.pnl, label="Units: ")
- cb_units_choices = ['imperial', 'metric']
- cb_units_default = 'imperial'
- self.cb_units = wx.ComboBox(self.pnl, choices=cb_units_choices,
- value=cb_units_default, style=wx.CB_READONLY)
+ self.wx_items['StaticText']['distance'] = wx.StaticText(self.pnl,
+ label="Distance: ",
+ style=wx.ALIGN_RIGHT)
+ self.wx_items['TextEntry']['distance'] = wx.TextCtrl(self.pnl,
+ value="0",
+ size=(140, -1))
+
+ self.wx_items['StaticText']['elevation'] = wx.StaticText(self.pnl,
+ label="Elevation: ",
+ style=wx.ALIGN_RIGHT)
+ self.wx_items['TextEntry']['elevation'] = wx.TextCtrl(self.pnl,
+ value="0",
+ size=(140, -1))
+
+ self.wx_items['StaticText']['fitness'] = wx.StaticText(self.pnl,
+ label="Fitness: ",
+ style=wx.ALIGN_RIGHT)
+ rb_fitness_choices = ['slow', 'average', 'fast']
+ rb_fitness_default = 'average'
+ self.wx_items['RadioButton']['fitness'] = wx.ComboBox(self.pnl,
+ choices=rb_fitness_choices,
+ value=rb_fitness_default,
+ style=wx.CB_READONLY)
+
+ self.wx_items['StaticText']['travel_mode'] = wx.StaticText(self.pnl,
+ label="Travel Mode: ",
+ style=wx.ALIGN_RIGHT)
+ rb_travel_mode_choices = ['uphill', 'flat', 'downhill', 'bushwhacking']
+ rb_travel_mode_default = 'uphill'
+ self.wx_items['RadioButton']['travel_mode'] = wx.ComboBox(self.pnl,
+ choices=rb_travel_mode_choices,
+ value=rb_travel_mode_default,
+ style=wx.CB_READONLY)
+
+ self.wx_items['StaticText']['units'] = wx.StaticText(self.pnl,
+ label="Units: ",
+ style=wx.ALIGN_RIGHT)
+ rb_units_choices = ['imperial', 'metric']
+ rb_units_default = 'imperial'
+
+ self.wx_items['RadioButton']['units'] = []
+ for choice in rb_units_choices:
+ label = choice
+ style = wx.RB_GROUP if choice == rb_units_default else 0
+ self.wx_items['RadioButton']['units'].append(wx.RadioButton(self.pnl,
+ label=label,
+ style=style))