[wxMSW,wxGTK] wxChoice, height of dropdown list

Carsten A. Arnholm arnholm at offline.no
Fri Dec 21 15:04:51 PST 2007


Vadim Zeitlin wrote:
> On Thu, 20 Dec 2007 22:59:06 +0100 "Carsten A. Arnholm"
> <arnholm at offline.no> wrote:
>
>> I have been playing with the idea of creating another control, almost
>> identical to wxChoice, but it would always use a wxListBox as the
>> drop down,
>
> Looks a lot like wxComboBox to me.

But I thought a wxComboBox does not use a wxListBox, but a native drop-down, 
just like wxChoice? Is there any other significant difference between 
wxComboBox and wxChoice, other than that wxChoice prohibits editing ?

>> I was thinking the new control could inherit from wxChoice and
>> create a wxListBox on top of other windows in a handler for
>> wxEVT_LEFT_DOWN.
>>
>> Would this be a bad idea? Or maybe it has been done before?
>
> It would certainly be more complicated than finding a way to set the
> size of the combobox drop down...

I don't think I understand what you mean. You said earlier "Under MSW we 
could implement such function but I'm not sure if it can be done in wxGTK at 
all". That is why I thought using only already portable wxWidgets components 
would be the only practical way it could be done.

I have looked at the MSW code for wxComboBox and it doesn't seem obvious to 
me how to do it even under MSW (I am no Windows API expert ...). For wxGTK I 
have no idea.

I am confused ...

-- 
Carsten A. Arnholm
http://arnholm.org/
N59.776 E10.457 








More information about the wx-users mailing list