Ignore:
Timestamp:
Oct 1, 2022 7:23:35 PM (12 months ago)
Author:
toby
Message:

Pawley work: force dmin & max to be in range of data (now shown); show negative intensities in red; Add option to do 'estimate' after 'Pawley Create'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r5340 r5341  
    3232                                   or list value. Optionally calls function when a
    3333                                   choice is selected
     34:func:`G2CheckBoxFrontLbl`         A version of :class:`G2CheckBox` that places the label
     35                                   for the check box in front. Otherwise works the same.
    3436:class:`G2SliderWidget`            A customized combination of a wx.Slider and a validated
    3537                                   wx.TextCtrl (see :class:`ValidatedTxtCtrl`).
     
    13931395        log.LogVarChange(self.loc,self.key)
    13941396        if self.OnChange: self.OnChange(event)
    1395                    
     1397
     1398def G2CheckBoxFrontLbl(parent,label,loc,key,OnChange=None):
     1399    '''A customized version of a CheckBox that automatically initializes
     1400    the control to a supplied list or dict entry and updates that
     1401    entry as the widget is used. Same as :class:`G2CheckBox` except the
     1402    label is placed before the CheckBox and returns a sizer rather than the
     1403    G2CheckBox.
     1404
     1405    If the CheckBox is needed, use Sizer.myCheckBox.
     1406    '''
     1407    Sizer = wx.BoxSizer(wx.HORIZONTAL)
     1408    Sizer.Add(wx.StaticText(parent,label=label),0,WACV)
     1409    checkBox = G2CheckBox(parent,'',loc,key,OnChange)
     1410    Sizer.Add(checkBox,0,WACV)
     1411    Sizer.myCheckBox = checkBox
     1412    return Sizer
     1413   
    13961414#### Commonly used dialogs ################################################################################
    13971415def CallScrolledMultiEditor(parent,dictlst,elemlst,prelbl=[],postlbl=[],
Note: See TracChangeset for help on using the changeset viewer.