more wxComboBox problems

wxPyrts,

I've been helping Jeff Childers with his wxMaskedTextCtrl, and have
been trying to extract his code out into a mixin to allow creation
of a wxMaskedComboBox as well.

However, I'm beginning to think it's not going to work, because of
deficiencies in wxComboBox. So far (at least under MSW), it:

a) doesn't do background coloring properly (see previous post)
b) doesn't provide a method for determining the selection of the
   text part of the control
c) doesn't do its auto-complete magic unless all keystrokes have
   had event.Skip() called on them. (That is, .SetValue()
   doesn't set up the up/down arrow to auto-complete if the
   arrows are subsequently typed.)
d) doesn't pass up/down arrow events to the OnChar routine, so I
   can't find a way to do the a"uto-complete" myself.

I've managed to work around (b) by:
  1) getting the current value,
  2) calling self.Cut(),
  3) getting the value again,
  4) seeing if it's changed, and if so,
     a) calculating the extent of the cut to determine the selection,
     b) restoring the original value, and
     c) calling .SetMark() to reselect what was selected before.

(This has the annoying side effect of generating lots
of extra events on the control for no good reason, but it
works...)

However, I've had no luck with any of the other problems.
Should I just bag this, or is there a way around these problems?

Frustrated,
/Will Sadkin
Parlance Corporation

Will Sadkin wrote:

a) doesn't do background coloring properly (see previous post)

A bug that should fixed. Please enter a bug report.

b) doesn't provide a method for determining the selection of the text part of the control

An omission that may also be able to be fixed, but not until 2.5. Please enter a bug report.

c) doesn't do its auto-complete magic unless all keystrokes have had event.Skip() called on them. (That is, .SetValue()
   doesn't set up the up/down arrow to auto-complete if the
   arrows are subsequently typed.)
d) doesn't pass up/down arrow events to the OnChar routine, so I can't find a way to do the a"uto-complete" myself.

You should be able to get them in a EVT_KEY_DOWN.

However, I've had no luck with any of the other problems.
Should I just bag this,

Probably, at least until the bugs are fixed.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!