Replacing wx.Choice controls by wx.ComboBox controls
authorlaurent
Tue, 15 Sep 2009 10:58:38 +0200
changeset 585 d62424ba12bf
parent 584 e23359f62023
child 586 05ba6b57ff2b
Replacing wx.Choice controls by wx.ComboBox controls
objdictgen/commondialogs.py
objdictgen/subindextable.py
--- a/objdictgen/commondialogs.py	Tue Sep 15 10:47:38 2009 +0200
+++ b/objdictgen/commondialogs.py	Tue Sep 15 10:58:38 2009 +0200
@@ -479,9 +479,9 @@
               label=_('Type:'), name='staticText1', parent=self,
               pos=wx.Point(0, 0), size=wx.Size(0, 17), style=0)
 
-        self.Type = wx.Choice(choices=[], id=ID_USERTYPEDIALOGTYPE,
+        self.Type = wx.ComboBox(choices=[], id=ID_USERTYPEDIALOGTYPE,
               name='Type', parent=self, pos=wx.Point(0, 0),
-              size=wx.Size(0, 24), style=0)
+              size=wx.Size(0, 28), style=wx.CB_READONLY)
         self.Type.Bind(wx.EVT_CHOICE, self.OnTypeChoice,
               id=ID_USERTYPEDIALOGTYPE)
 
@@ -710,9 +710,9 @@
               label=_('Type:'), name='staticText3', parent=self,
               pos=wx.Point(0, 0), size=wx.Size(0, 17), style=0)
 
-        self.Type = wx.Choice(choices=[], id=ID_NODEINFOSDIALOGTYPE,
+        self.Type = wx.ComboBox(choices=[], id=ID_NODEINFOSDIALOGTYPE,
               name='Type', parent=self, pos=wx.Point(0, 0),
-              size=wx.Size(0, 25), style=0)
+              size=wx.Size(0, 28), style=wx.CB_READONLY)
 
         self.staticText4 = wx.StaticText(id=ID_NODEINFOSDIALOGSTATICTEXT4,
               label=_('Default String Size:'), name='staticText4', parent=self,
@@ -909,9 +909,9 @@
               label=_('Profile:'), name='staticText4', parent=self,
               pos=wx.Point(0, 0), size=wx.Size(0, 17), style=0)
 
-        self.Type = wx.Choice(choices=[], id=ID_CREATENODEDIALOGTYPE,
+        self.Type = wx.ComboBox(choices=[], id=ID_CREATENODEDIALOGTYPE,
               name='Type', parent=self, pos=wx.Point(0, 0),
-              size=wx.Size(0, 25), style=0)
+              size=wx.Size(0, 28), style=wx.CB_READONLY)
 
         self.NodeName = wx.TextCtrl(id=ID_CREATENODEDIALOGNAME, name='NodeName',
               parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 24), 
@@ -921,9 +921,9 @@
               parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 24), 
               style=wx.TE_RIGHT, value='')
 
-        self.Profile = wx.Choice(choices=[], id=ID_CREATENODEDIALOGPROFILE,
+        self.Profile = wx.ComboBox(choices=[], id=ID_CREATENODEDIALOGPROFILE,
               name='Profile', parent=self, pos=wx.Point(0, 0),
-              size=wx.Size(0, 24), style=0)
+              size=wx.Size(0, 28), style=wx.CB_READONLY)
         self.Profile.Bind(wx.EVT_CHOICE, self.OnProfileChoice,
               id=ID_CREATENODEDIALOGPROFILE)
 
@@ -1172,9 +1172,9 @@
               label=_('EDS File:'), name='staticText3', parent=self,
               pos=wx.Point(0, 0), size=wx.Size(0, 17), style=0)
 
-        self.EDSFile = wx.Choice(id=ID_ADDSLAVEDIALOGEDSFILE,
+        self.EDSFile = wx.ComboBox(id=ID_ADDSLAVEDIALOGEDSFILE,
               name='EDSFile', parent=self, pos=wx.Point(0, 0),
-              size=wx.Size(0, 24), style=0)
+              size=wx.Size(0, 28), style=wx.CB_READONLY)
         
         self.ImportEDS = wx.Button(id=ID_ADDSLAVEDIALOGIMPORTEDS, label=_('Import EDS'),
               name='ImportEDS', parent=self, pos=wx.Point(0, 0),
--- a/objdictgen/subindextable.py	Tue Sep 15 10:47:38 2009 +0200
+++ b/objdictgen/subindextable.py	Tue Sep 15 10:58:38 2009 +0200
@@ -221,6 +221,8 @@
         maplist = None
         for row in range(self.GetNumberRows()):
             editors = self.editors[row]
+            grid.SetRowMinimalHeight(row, 28)
+            grid.AutoSizeRow(row, False)
             for col in range(self.GetNumberCols()):
                 editor = None
                 renderer = None
@@ -464,9 +466,9 @@
         self.AddButton.Bind(wx.EVT_BUTTON, self.OnAddButtonClick,
               id=ID_EDITINGPANELADDBUTTON)
 
-        self.IndexChoice = wx.Choice(choices=[], id=ID_EDITINGPANELINDEXCHOICE,
+        self.IndexChoice = wx.ComboBox(choices=[], id=ID_EDITINGPANELINDEXCHOICE,
               name='IndexChoice', parent=self.IndexListPanel, pos=wx.Point(50,
-              0), size=wx.Size(-1, 30), style=0)
+              0), size=wx.Size(-1, 30), style=wx.CB_READONLY)
 
         self._init_sizers()