Changeset 2569 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Dec 9, 2016 3:17:43 PM (5 years ago)
Author:
vondreele
Message:

add 'f' or 'g' to maxdigits in FormatValue? in G2py3 - should be revised some more
do a lot of TextCtrl? --> ValidatedTextCtrl? replacements
note that ValidatedTextCtrl? only checks val <= max & not val < max
added tc.event to ValidatedTextCtrl? as some things needed that
G2imgGui - mostly done
G2restrGUI - done
G2pwdGUI - started

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r2567 r2569  
    24332433            subSizer.Add(matsel,0,WACV)
    24342434            subSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Volume fraction: '),0,WACV)
     2435#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    24352436            volfrac = wx.TextCtrl(G2frame.dataDisplay,value=str('%.3f'%(item['VolFrac'])),style=wx.TE_PROCESS_ENTER)
    24362437            Info[volfrac.GetId()] = [id,'VolFrac']
     
    31573158    littleSizer.Add(NcNo,0,WACV)
    31583159    littleSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Start Volume '),0,WACV)
     3160#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    31593161    startVol = wx.TextCtrl(G2frame.dataDisplay,value=str('%d'%(controls[3])),style=wx.TE_PROCESS_ENTER)
    31603162    startVol.Bind(wx.EVT_TEXT_ENTER,OnStartVol)
     
    31993201    else:
    32003202        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)
    32013204        zero = wx.TextCtrl(G2frame.dataDisplay,value="%.4f"%(controls[1]),style=wx.TE_PROCESS_ENTER)
    32023205        zero.Bind(wx.EVT_TEXT_ENTER,OnZero)
     
    32273230        littleSizer.Add(wx.StaticText(G2frame.dataDisplay,label=txt),0,WACV)
    32283231        if ifEdit:          #a,b,c,etc.
     3232#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    32293233            cellVal = wx.TextCtrl(G2frame.dataDisplay,value=(fmt%(controls[6+Id])),style=wx.TE_PROCESS_ENTER)
    32303234            cellVal.Bind(wx.EVT_TEXT_ENTER,OnCellChange)       
     
    32653269            if show:
    32663270                valSizer = wx.BoxSizer(wx.HORIZONTAL)
     3271#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    32673272                modVal = wx.TextCtrl(G2frame.dataDisplay,value=('%.4f'%(val)),
    32683273                    size=wx.Size(50,20),style=wx.TE_PROCESS_ENTER)
     
    38313836                    elSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' '+El+': '),
    38323837                        0,WACV)
     3838#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    38333839                    num = wx.TextCtrl(G2frame.dataDisplay,value='%.2f'%(Elems[El]['Num']),style=wx.TE_PROCESS_ENTER)
    38343840                    Indx[num.GetId()] = [name,El,'Num']
     
    38403846                vdsSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Volume: '),
    38413847                    0,WACV)
     3848#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    38423849                vol = wx.TextCtrl(G2frame.dataDisplay,value='%.3f'%(Substance['Volume']),style=wx.TE_PROCESS_ENTER)
    38433850                Indx[vol.GetId()] = [name,'Volume']
     
    38473854                vdsSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Density: '),
    38483855                    0,WACV)
     3856#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    38493857                den = wx.TextCtrl(G2frame.dataDisplay,value='%.3f'%(Substance['Density']),style=wx.TE_PROCESS_ENTER)
    38503858                Indx[den.GetId()] = [name,'Density']
     
    42244232        if data['Size']['Shape'][0] not in ['Unified sphere',]:
    42254233            partSizer.Add(wx.StaticText(G2frame.dataDisplay,label=shapes[data['Size']['Shape'][0]]),0,WACV)
     4234#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    42264235            partprm = wx.TextCtrl(G2frame.dataDisplay,value='%.3f'%(data['Size']['Shape'][1]),
    42274236                style=wx.TE_PROCESS_ENTER)
     
    44154424                        parmSizer.Add(parmVar,0,WACV)
    44164425                        Indx[parmVar.GetId()] = [Parms[parm],1]
     4426#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    44174427                    parmValue = wx.TextCtrl(G2frame.dataDisplay,value='%.3g'%(Parms[parm][0]),
    44184428                        style=wx.TE_PROCESS_ENTER)
     
    44434453                            parmVar.Bind(wx.EVT_CHECKBOX, OnSelect)
    44444454                            parmSizer.Add(parmVar,0,WACV)
     4455#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    44454456                            parmValue = wx.TextCtrl(G2frame.dataDisplay,value='%.3g'%(Args[parm][0]),
    44464457                                style=wx.TE_PROCESS_ENTER)
     
    45764587    topSizer.Add(fitSel,0,WACV)
    45774588    topSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Error multiplier: '),0,WACV)
     4589#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    45784590    esdScale = wx.TextCtrl(G2frame.dataDisplay,value='%.3f'%(1./np.sqrt(ProfDict['wtFactor'])),style=wx.TE_PROCESS_ENTER)
    45794591    esdScale.Bind(wx.EVT_TEXT_ENTER,OnEsdScale)       
     
    45934605    backSizer = wx.BoxSizer(wx.HORIZONTAL)
    45944606    backSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Background:'),0,WACV)
     4607#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    45954608    backVal = wx.TextCtrl(G2frame.dataDisplay,value='%.3g'%(data['Back'][0]),style=wx.TE_PROCESS_ENTER)
    45964609    Indx[backVal.GetId()] = ['Back',0,'%.3g']
Note: See TracChangeset for help on using the changeset viewer.