]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/masked/maskededit.py
check for wxHAS_HUGE_FILES
[wxWidgets.git] / wxPython / wx / lib / masked / maskededit.py
index dc78b9dc7ea27c7535fcfc441773806242eda883..c64c48588edb9418445e748f95155aa3a4694f77 100644 (file)
@@ -1919,8 +1919,7 @@ class MaskedEditMixin:
                 width = self.GetSize().width
                 height = self.GetBestSize().height
 ##                dbg('setting client size to:', (width, height))
-                self.SetSize((width, height))
-                self.SetSizeHints((width, height))
+                self.SetBestFittingSize((width, height))
 
             # Set value/type-specific formatting
             self._applyFormatting()
@@ -2002,7 +2001,7 @@ class MaskedEditMixin:
                     #  the outside size that does include the borders.  What you are
                     #  calculating (in _CalcSize) is the client size, but the sizers
                     #  deal with the full size and so that is the minimum size that
-                    #  we need to set with SetSizeHints.  The root of the problem is
+                    #  we need to set with SetBestFittingSize.  The root of the problem is
                     #  that in _calcSize the current client size height is returned,
                     #  instead of a height based on the current font.  So I suggest using
                     #  _calcSize to just get the width, and then use GetBestSize to
@@ -2010,8 +2009,7 @@ class MaskedEditMixin:
                     self.SetClientSize(self._CalcSize())
                     width = self.GetSize().width
                     height = self.GetBestSize().height
-                    self.SetSize((width, height))
-                    self.SetSizeHints((width, height))
+                    self.SetBestFittingSize((width, height))
 
 
             # Set value/type-specific formatting
@@ -4930,7 +4928,7 @@ class MaskedEditMixin:
                     matched_str = newtext
                     newtext = self._ctrl_constraints._choices[match_index]
                     edit_end = self._ctrl_constraints._extent[1]
-                    new_select_to = min(edit_end, len(newvalue.rstrip()))
+                    new_select_to = min(edit_end, len(newtext.rstrip()))
                     match_field = self._ctrl_constraints
                     if self._ctrl_constraints._insertRight:
                         # adjust position to just after partial match in control: