I don't have my code in front of me, but I had success setting the size of
the wxComboBox (using wxWindow::SetClientSize(size)) after every change in
the list contents. The height will be rounded (down?) to the nearest whole
entry (or less, if the list is short), and it only affects the dropdown
part. I presume the entry part's height is tied to the text height. The
width affects both parts.
-Jeremy
···
-----Original Message-----
From: Mikhael Loo [mailto:mikhael@lib-sys.com]
Sent: Thursday, June 07, 2001 6:52 AM
To: wxpython-users@lists.wxwindows.org
Subject: Re: [wxPython] Vertical size of ComboBox Adjustable?
Well, I tried setting the height but I don't think it is used. When it is
set at -1, 0, or 200 it doesn't seem to make any difference. I have noticed
in the list archives that people are working on the wxChoice/wxComboBox
because of a problem in conjunction with using sizers. Could using a sizer
help my combo boxes? Will I encounter the same problems if I switch to
wxChoice or wxListbox? Could setting the readonly flag be a factor?
-Mikhael
----- Original Message -----
From: "Robin Dunn" <robin@alldunn.com>
To: <wxpython-users@lists.wxwindows.org>
Sent: Thursday, June 07, 2001 1:01 AM
Subject: Re: [wxPython] Vertical size of ComboBox Adjustable?
> I'm having trouble getting the dropdown menus of the wxComboBox object
to
> adapt to the sizes of my lists. I see the little scroll bar is attached
so
> that you can scroll through the list but I would like my user to be able
to
> select an option without scrolling. Even if there are only two items in
the
> list the drop down box is still a scrolling one. Is there a way for the
> user to see the whole list?
>
> here is a cut from my code...
>
> DisplayModeCB = wxComboBox(OptionDlg, cID, "Windows Bitmap",
> wxPoint(130, 15), wxSize(200, -1),
> DisplayMode, wxCB_DROPDOWN)
>You could try setting the height in the size parameter, but I think that
will only affect the size of the undropped combo and that the size of the
dropdown is fixed.--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users