Changeset 1972
- Timestamp:
- Sep 16, 2015 5:35:18 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIElemGUI.py
r1589 r1972 43 43 else: 44 44 color=E[6] 45 PickElement.ElButton(self,name=E[0], 46 pos=wx.Point(E[1]*self.butWid+25,E[2]*24+24),tip=E[3],color=color) 45 self.ElButton(name=E[0], 46 pos=wx.Point(E[1]*self.butWid+25,E[2]*24+24), 47 tip=E[3],color=color) 47 48 i+=1 48 49 … … 54 55 55 56 def ElButton(self, name, pos, tip, color): 56 ' Needs a doc string'57 'Creates an element button widget' 57 58 Black = wx.Colour(0,0,0) 58 59 if not self.ifNone and name[0] == 'None': … … 66 67 if name[0] == 'None': 67 68 butWid *= 2 68 El = wx.ComboBox(choices=name, parent=self, pos=pos, size=wx.Size(butWid,23), 69 style=wx.CB_READONLY, value=name[0]) 69 # patch for wx 2.9+ on Mac where EVT_COMBOBOX happens only on 70 # value change. Not ideal because wx.CB_READONLY is better. 71 i,j= wx.__version__.split('.')[0:2] 72 if int(i)+int(j)/10. > 2.8 and 'wxOSX' in wx.PlatformInfo: 73 74 El = wx.ComboBox(choices=name, parent=self, pos=pos, size=wx.Size(butWid,23), 75 style=wx.CB_DROPDOWN, value=name[0]+' ') # add an invisible space 76 else: 77 El = wx.ComboBox(choices=name, parent=self, pos=pos, size=wx.Size(butWid,23), 78 style=wx.CB_READONLY, value=name[0]) 70 79 El.Bind(wx.EVT_COMBOBOX,self.OnElButton) 71 80
Note: See TracChangeset
for help on using the changeset viewer.