wxChoice or wxComboBox in wxHTMLWindow, winXP, wxPython 2.8.4

If you embed a wxChoice or a wxComboBox control in a wxHTMLWindow used
wxHtmlWidgetCell, there's some sort of event blockage that happens and
the html window won't repaint until the dropdown in the combo box is
shown. Other events are blocked as well - for example, closing the
parent frame won't actually close until the drop down arrow is
clicked.

It doesn't happen if you just parent the control from the window, a
wxHtmlWidgetCell that handles positioning is neccesary. It also
doesn't happen if you nest the control inside a panel.

I've looked at the source of wxHtmlWidgetCell and all it does is call
SetSize(), so I have no idea why this happens.

This is easily tested in the wxPython demo by adding a <wxp
module="wx" class="ComboBox"></wxp> to the demos HTML page.

I haven't tested this on any platform except Windows, but because of
the symptoms I am pretty sure it's windows specific and is related to
the windows event loop. I've also only tested with wxPython but
wxPython doesn't appear to add any extra code to the C++ objects
involved beyond normal wrapping.

Chris Mellon wrote:

I haven't tested this on any platform except Windows, but because of
the symptoms I am pretty sure it's windows specific and is related to
the windows event loop. I've also only tested with wxPython but
wxPython doesn't appear to add any extra code to the C++ objects
involved beyond normal wrapping.

It is Windows specific, and has been a known problem for a long time. You've already discovered the workaround that is normally suggested, which is to just embed the combo in a panel and put that in the htmlwindow.

ยทยทยท

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