[wxPython] wxChoice dropdown list size?

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

[wxPython] wxChoice dropdown list size?

Harri Pasanen
After a long period of doing other things, I've played a bit with
wxPython.  Excellent job Robin, glad to see it going strong.

I've found very few gotchas, but one is wxChoice.  I suspect this is a
wxWindows problem, rather than wxPython.

If I do Appends() to wxChoice, the items are there, but the dropdown
list is not resized accordingly.  So when the list is dropped down, my
Appended items not always visible, or existing items seem to have
disappeared.  There is no scroll bar to give a hint that the items are
there; with cursor keys it is however possible to scroll to the hidden
items.

If the list is full at wxChoice creation time, then the dropdown list is
usually big enough to display all the items.  

In the wxChoice constructor I would have expected a parameter to say how
many items should be visible in the drop-down list, and a scroll bar to
be added automatically if that number was exceeded in list items.

Has anyone else experienced similar symptoms?
I've only played with this at late hours, being tired, so I may be
missing something here.

Harri

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxChoice dropdown list size?

alexander smishlajev-3
Harri Pasanen wrote:
>
> If I do Appends() to wxChoice, the items are there, but the dropdown
> list is not resized accordingly.  So when the list is dropped down, my
> Appended items not always visible, or existing items seem to have
> disappeared.  There is no scroll bar to give a hint that the items are
> there; with cursor keys it is however possible to scroll to the hidden
> items.

may wxComboBox with style=wxCB_DROPDOWN|wxCB_READONLY suit your needs?

best wishes,
alex.


_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxChoice dropdown list size?

Harri Pasanen
alexander smishlajev wrote:

>
> Harri Pasanen wrote:
> >
> > If I do Appends() to wxChoice, the items are there, but the dropdown
> > list is not resized accordingly.  So when the list is dropped down, my
> > Appended items not always visible, or existing items seem to have
> > disappeared.  There is no scroll bar to give a hint that the items are
> > there; with cursor keys it is however possible to scroll to the hidden
> > items.
>
> may wxComboBox with style=wxCB_DROPDOWN|wxCB_READONLY suit your needs?
>
> best wishes,
> alex.
>

Seems to work well, thanks!

I'm only left wondering why wxChoice exists in the first place?  Perhaps
some good historical reason, or platform dependent reason...

Harri


_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users