Changeset 1989
- Timestamp:
- Oct 6, 2015 5:48:53 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrls.py
r1971 r1989 308 308 self.OnLeaveArgs = OnLeaveArgs 309 309 self.CIFinput = CIFinput 310 self.notBlank = notBlank 310 311 self.type = str 311 312 # initialization … … 464 465 ''' 465 466 val = self.GetValue().strip() 466 self.invalid = not val 467 if self.notBlank: 468 self.invalid = not val 469 else: 470 self.invalid = False 467 471 self._IndicateValidity() 468 472 if self.invalid: … … 962 966 The CheckBox will be initialized from this value. 963 967 If the value is anything other that True (or 1), it will be taken as 964 False. 968 False. 969 :param function OnChange: specifies a function or method that will be 970 called when the CheckBox is changed (Default is None). 971 The called function is supplied with one argument, the calling event. 965 972 ''' 966 def __init__(self,parent,label,loc,key ):973 def __init__(self,parent,label,loc,key,OnChange=None): 967 974 wx.CheckBox.__init__(self,parent,id=wx.ID_ANY,label=label) 968 975 self.loc = loc 969 976 self.key = key 977 self.OnChange = OnChange 970 978 self.SetValue(self.loc[self.key]==True) 971 979 self.Bind(wx.EVT_CHECKBOX, self._OnCheckBox) … … 973 981 self.loc[self.key] = self.GetValue() 974 982 log.LogVarChange(self.loc,self.key) 975 983 if self.OnChange: self.OnChange(event) 984 976 985 ################################################################################ 977 986 #### Commonly used dialogs
Note: See TracChangeset
for help on using the changeset viewer.