if maskededit_kwargs.keys():
self.SetCtrlParameters(**maskededit_kwargs)
- # Record end of integer and place cursor there:
- integerEnd = self._fields[0]._extent[1]
- self.SetInsertionPoint(0)
- self.SetInsertionPoint(integerEnd)
- self.SetSelection(integerEnd, integerEnd)
-
# Go ensure all the format codes necessary are present:
orig_intformat = intformat = self.GetFieldParameter(0, 'formatcodes')
if 'r' not in intformat:
else:
self.SetCtrlParameters(formatcodes=intformat)
+ # Record end of integer and place cursor there unless selecting, or select entire field:
+ integerStart, integerEnd = self._fields[0]._extent
+ if not self._fields[0]._selectOnFieldEntry:
+ self.SetInsertionPoint(0)
+ self.SetInsertionPoint(integerEnd)
+ self.SetSelection(integerEnd, integerEnd)
+ else:
+ self.SetInsertionPoint(0) # include any sign
+ self.SetSelection(0, integerEnd)
+
+
# Set min and max as appropriate:
if kwargs.has_key('min'):
min = kwargs['min']