Merged modifications from the 2.6 branch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-12-30 23:02:03 +00:00
parent a780a8dc19
commit 02b800ce7c
104 changed files with 14102 additions and 46560 deletions

View File

@@ -762,12 +762,6 @@ class NumCtrl(BaseMaskedTextCtrl, NumCtrlAccessorsMixin):
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:
@@ -780,6 +774,17 @@ class NumCtrl(BaseMaskedTextCtrl, NumCtrlAccessorsMixin):
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']