Changeset 1389


Ignore:
Timestamp:
Jun 18, 2014 2:48:19 PM (7 years ago)
Author:
vondreele
Message:

fix format of image center in GUI - now two rows..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r1386 r1389  
    483483        calibSizer = wx.FlexGridSizer(0,2,5,5)
    484484        calibSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Calibration coefficients'),0,WACV)   
    485         calibSizer.Add((5,0),0)       
    486         calibSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Beam center X,Y'),0,WACV)
     485        calibSizer.Add((5,0),0)
    487486        cent = data['center']
    488         centText = wx.TextCtrl(parent=G2frame.dataDisplay,value=("%7.2f,%7.2f" % (cent[0],cent[1])),style=wx.TE_READONLY)
    489         centText.SetBackgroundColour(VERY_LIGHT_GREY)
    490         calibSizer.Add(centText,0,WACV)       
     487        for axis,cnt in zip(['X','Y'],cent):
     488            calibSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Beam center '+axis),0,WACV)
     489            centText = wx.TextCtrl(parent=G2frame.dataDisplay,value=("%7.2f" % (cnt)),style=wx.TE_READONLY)
     490            centText.SetBackgroundColour(VERY_LIGHT_GREY)
     491            calibSizer.Add(centText,0,WACV)       
    491492        calibSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Wavelength'),0,WACV)
    492493        waveSel = wx.TextCtrl(parent=G2frame.dataDisplay,value=("%7.5f" % (data['wavelength'])),
     
    16151616        samZ.Bind(wx.EVT_KILL_FOCUS,OnSamZ)
    16161617        samSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,label=' Sample load(MPa): '),0,WACV)
    1617         samLoad = wx.TextCtrl(G2frame.dataDisplay,-1,value=("%.3f" % (data['Sample load'])),
    1618             style=wx.TE_PROCESS_ENTER)
     1618        samLoad = G2gd.ValidatedTxtCtrl(G2frame.dataDisplay,data,'Sample load',
     1619                nDig=[8,3],typeHint=float,)
    16191620        samSizer.Add(samLoad,0,WACV)
    1620         samLoad.Bind(wx.EVT_TEXT_ENTER,OnSamLoad)
    1621         samLoad.Bind(wx.EVT_KILL_FOCUS,OnSamLoad)
    16221621
    16231622        return samSizer
Note: See TracChangeset for help on using the changeset viewer.