PopupTransientWindow and ComboBox

classic Classic list List threaded Threaded
4 messages Options
UF0
Reply | Threaded
Open this post in threaded view
|

PopupTransientWindow and ComboBox

UF0
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!

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

combo_popup.py (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PopupTransientWindow and ComboBox

Tim Roberts
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, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
UF0
Reply | Threaded
Open this post in threaded view
|

Re: PopupTransientWindow and ComboBox

UF0
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!

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: PopupTransientWindow and ComboBox

Anders Munch
In reply to this post by UF0
UF0:
> My goal is to create a lateral hidden menu, activated by a button, from which to make some selections.
> [...]
> Any suggestions on a good replacement of the comboboxes?

A precisely positioned Dialog with style=0 can be a pretty good alternative to Popup[Transient]Window.
You have to close/hide it manually, but in return you can put anything on it.

regards, Anders

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.