Changeset 2570 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Dec 10, 2016 11:55:32 AM (5 years ago)
Author:
vondreele
Message:

more TextCtrl? --> ValidatedTextCtrl?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r2569 r2570  
    26692669        Obj = event.GetEventObject()
    26702670        bravais[bravList.index(Obj.GetId())] = Obj.GetValue()
    2671        
    2672     def OnZero(event):
    2673         event.Skip()
    2674         try:
    2675             Zero = min(5.0,max(-5.0,float(zero.GetValue())))
    2676         except ValueError:
    2677             Zero = 0.0
    2678         controls[1] = Zero
    2679         zero.SetValue("%.4f"%(Zero))
    2680        
     2671               
    26812672    def OnZeroVar(event):
    26822673        controls[0] = zeroVar.GetValue()
     
    32013192    else:
    32023193        littleSizer.Add(wx.StaticText(G2frame.dataDisplay,label=" Zero offset"),0,WACV)
    3203 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    3204         zero = wx.TextCtrl(G2frame.dataDisplay,value="%.4f"%(controls[1]),style=wx.TE_PROCESS_ENTER)
    3205         zero.Bind(wx.EVT_TEXT_ENTER,OnZero)
    3206         zero.Bind(wx.EVT_KILL_FOCUS,OnZero)
     3194        zero = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,controls,1,nDig=(10,4),typeHint=float,min=-5.,max=5.)
    32073195        littleSizer.Add(zero,0,WACV)
    32083196        zeroVar = wx.CheckBox(G2frame.dataDisplay,label="Refine?")
Note: See TracChangeset for help on using the changeset viewer.