Changeset 527 for trunk/GSASIIElemGUI.py


Ignore:
Timestamp:
Apr 3, 2012 1:26:28 PM (10 years ago)
Author:
vondreele
Message:

more on map peak fitting
add a global for htmlFirstUse
fix periodic table display in unix/linux
fix setting of atom type in linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElemGUI.py

    r484 r527  
    1010########### SVN repository information ###################
    1111import wx
     12import os
    1213import wx.lib.colourselect as wscs
    1314class PickElement(wx.Dialog):
     
    1920              style=wx.DEFAULT_DIALOG_STYLE, title='Pick Element')
    2021        import ElementTable as ET
    21         self.SetClientSize(wx.Size(770, 250))
     22        self.butWid = 55
     23        if 'nt' in os.name:
     24            self.butWid = 40
     25        self.SetClientSize(wx.Size(130+16*self.butWid, 250))
    2226       
    2327        i=0
     
    2832                color=E[6]
    2933            PickElement.ElButton(self,name=E[0],
    30                pos=wx.Point(E[1]*40+25,E[2]*24+24),tip=E[3],color=color,oneOnly=oneOnly)
     34               pos=wx.Point(E[1]*self.butWid+25,E[2]*24+24),tip=E[3],color=color,oneOnly=oneOnly)
    3135            i+=1
    3236
     
    3842        if oneOnly:
    3943            El = wscs.ColourSelect(label=name[0], parent=self,colour=color,
    40                 pos=pos, size=wx.Size(40,23), style=wx.RAISED_BORDER)
     44                pos=pos, size=wx.Size(self.butWid,23), style=wx.RAISED_BORDER)
    4145#            El.SetLabel(name)
    4246            El.Bind(wx.EVT_BUTTON, self.OnElButton)
    4347        else:
    44             El = wx.ComboBox(choices=name, parent=self, pos=pos, size=wx.Size(40,23),
     48            El = wx.ComboBox(choices=name, parent=self, pos=pos, size=wx.Size(self.butWid,23),
    4549                style=wx.CB_READONLY, value=name[0])
    4650            El.Bind(wx.EVT_COMBOBOX,self.OnElButton)
     
    5054
    5155    def OnElButton(self, event):
    52         El = event.GetEventObject().GetLabel()
     56        El = event.GetEventObject().GetValue()
    5357        self.Elem = El
    5458        self.EndModal(wx.ID_OK)       
Note: See TracChangeset for help on using the changeset viewer.