Commit Graph

10 Commits

Author SHA1 Message Date
Robin Dunn
d40652f42e masked/textctrl.py: A code refactoring bugfix for .ChangeValue() support.
masked/combobox.py: Several fixes for value selection behavior, and
                    one for navigation in readonly control.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-11 19:48:22 +00:00
Robin Dunn
c9e1d317b1 Fix to previous masked.TextCtrl change, to ensure inheritance chain
for derived controls isn't broken by new .ChangeValue() support in
base control.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-02 21:12:28 +00:00
Robin Dunn
e75f43c577 Updates to MaskedEdit controls from Will Sadkin:
maskededit.py:
    Added parameter option stopFieldChangeIfInvalid, which can be used to
    relax the validation rules for a control, but make best efforts to stop
    navigation out of that field should its current value be invalid.  Note:
    this does not prevent the value from remaining invalid if focus for the
    control is lost, via mousing etc.

  numctrl.py, demo / MaskedNumCtrl.py:
    In response to user request, added limitOnFieldChange feature, so that
    out-of-bounds values can be temporarily added to the control, but should
    navigation be attempted out of an invalid field, it will not navigate,
    and if focus is lost on a control so limited with an invalid value, it
    will change the value to the nearest bound.

  combobox.py:
    Added handler for EVT_COMBOBOX to address apparently inconsistent behavior
    of control when the dropdown control is used to do a selection.

  textctrl.py
    Added support for ChangeValue() function, similar to that of the base
    control, added in wxPython 2.7.1.1.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-02 01:00:30 +00:00
Robin Dunn
170acdc90e GetBestFittingSize --> GetEffectiveMinSize
SetBestFittingSize --> SetInitialSize
SetBestSize  --> SetInitialSize
SetInitialBestSize --> SetInitialSize


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-31 08:50:17 +00:00
Robin Dunn
b93f7ba634 ensure that the MasedEditMixin's version of IsEmpty is the one used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-19 21:38:55 +00:00
Robin Dunn
f54a36bba8 MaskedEdit updates from Will Sadkin:
- Added '*' mask char that means "all ansii chars" (ords 32-255)
    - Added proper unicode support to masked controls and wx.tools.dbg
    - Fixed two reported missing import bugs introduced by package
      creation
    - Converted masked package doc strings to reST format for better
      epydoc support
    - lots of doc string improvements and function hiding to better
      reflect package's public contents.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-11 22:13:18 +00:00
Robin Dunn
5193b348e8 SetSizeHints --> SetMinSize or SetBestFittingSize, and other tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-08-04 22:24:57 +00:00
Robin Dunn
339983ff62 Patches from Will Sadkin:
MaskedEditMixin:
- fixed size calculations on changing fonts
- fixed tabbing logic now that tab events are entered into the control
  by default (ie event.Skip()) if wx.TE_PROCESS_TAB is set
- fixed code attempting to fix the selection after focus events
  generated on control destruction, to prevent tracebacks

TextCtrl, ComboBox
- Added support for XRC
- Fixed sizing calculation code
- Added SetFont() override method that will recalculate the size if this
  is called.
- Added AppendItems() for ComboBox

NumCtrl:
- prevented ctrl from accepting same grouping and decimal character,
- fixed issue preventing paste from working if decimal char was different
  than '.'

TimeCtrl:
- Fixed default value to use 24hour time (which will be converted
  appropriately if format supports it, and added code to check if
  local timezone uses "AM/PM" for this concept; if not, control now
  defaults to 24hour format, and disallows the am/pm form.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-22 18:38:34 +00:00
Robin Dunn
5f280eaa57 Patch from Will Sadkin:
- Fixed intra-right-insert-field erase.
- Allowed right-insert in ipaddrctrl subfields.
- Made _SetValue() place cursor after last non-blank character inserted,
  rather than end of mask.
- Fixed combobox autoselect behavior to work similarly as above, so that
  said selection will only select the non-empty text, as per request.
- Fixed some incorrect undo behavior for right-insert fields
- Allowed derived classes (eg. numctrl) to pass modified values for undo
  processing (to handle/ignore grouping chars properly.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-19 16:25:55 +00:00
Robin Dunn
c878ceeae8 Added new MaskedEditControl code from Will Sadkin. The modules are
now locaed in their own sub-package, wx.lib.masked.  Demos updated.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-19 23:24:37 +00:00