Changeset 2631 for trunk/GSASIIctrls.py
- Timestamp:
- Jan 14, 2017 3:17:57 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrls.py
r2622 r2631 508 508 'Set the control colors to show invalid input' 509 509 if self.invalid: 510 ins = self.GetInsertionPoint() 510 511 self.SetForegroundColour("red") 511 512 self.SetBackgroundColour("yellow") 512 513 self.SetFocus() 513 self.Refresh() 514 self.Refresh() # this selects text on some Linuxes 515 self.SetSelection(0,0) # unselect 516 self.SetInsertionPoint(ins) # put insertion point back 514 517 else: # valid input 515 518 self.SetBackgroundColour( … … 733 736 ''' 734 737 if tc.invalid: 738 ins = tc.GetInsertionPoint() 735 739 tc.SetForegroundColour("red") 736 740 tc.SetBackgroundColour("yellow") 737 741 tc.SetFocus() 738 tc.Refresh() 742 tc.Refresh() # this selects text on some Linuxes 743 tc.SetSelection(0,0) # unselect 744 tc.SetInsertionPoint(ins) # put insertion point back 739 745 return False 740 746 else: # valid input
Note: See TracChangeset
for help on using the changeset viewer.