PopupTransientWindow and ComboBox

Hello there,

I’m new in wxpython and even if I’m appreciating it a lot, sometimes I get some behaviors that I can not explain.

This is one of those times.

In fact I inserted a ComboBox inside to PopupTransientWindow (fusing both wxpython-demo simple examples), but when I tray to select an item from the ComboBox, the items list is not shown (not dropped down).

Hoping in you help and you experiences. Code is in attach.

Many Thanks!

combo_popup.py (3.77 KB)

UF0 wrote:

I'm new in wxpython and even if I'm appreciating it a lot, sometimes I
get some behaviors that I can not explain.
This is one of those times.

In fact I inserted a ComboBox inside to PopupTransientWindow (fusing
both wxpython-demo simple examples), but when I tray to select an item
from the ComboBox, the items list is not shown (not dropped down).

This is just a limitation of the PopupTransientWindow on Windows. Did
you notice that NONE of the controls in your popup ever accept the
focus? If you click in the text control, you don't see the caret cursor.

There are comments about this in the wxWidgets C++ source code. In all
the systems except Mac and Linux, controls in a PopupTransientWindow
cannot receive the focus, and that will prevent your combo box from
working. PopupTransientWindows was actually designed to BE the popup
window for combo boxes, and it apparently has little use outside of that
very narrow design.

You will have to find another way. You might consider filing a bug
report, but that fact that it hasn't been solved suggests that there is
no easy solution.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Thanks, now everything is clear!

My goal is to create a lateral hidden menu, activated by a button, from which to make some selections.

These are 3 “selection fields” (so far I have used ComboBox): any next field is updated runtime each time I make a selection on the previous one. The items within each field from which select can be very numerous.

Any suggestions on a good replacement of the comboboxes?

Thanks again!