Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting the drop-list listbox size in a combo-box

511 views
Skip to first unread message

Thomas Dietz

unread,
Oct 17, 1996, 3:00:00 AM10/17/96
to

Does anyone know how to set the drop down listbox size of a combo-box? By
default it is the height of one row. I can't seem to find any options in
the resource editor or in the CComboBox class member list.

Tom

--
Thomas W. Dietz tdi...@glis.net
Chicagoland, IL USA FAX: 630-539-7709
http://www.pr.ais.net/tdietz

Yury Kosov

unread,
Oct 18, 1996, 3:00:00 AM10/18/96
to

Hi Thomas,
I'm using a little trick here. Change the style of a combobox to simple,
resize it to the height you'd like it to be, than change the style back to
dropdown. Drink some beer and enjoy the results. NOTE: beer is optional.

--
Yury Kosov
CoreTek, Inc
yu...@msn.com
http://www.coretek.com


Thomas Dietz <tdi...@glis.net> wrote in article
<54693a$a...@hyperion.tp.ac>...

Vagif Abilov

unread,
Oct 18, 1996, 3:00:00 AM10/18/96
to

tdi...@glis.net (Thomas Dietz) wrote:

>Does anyone know how to set the drop down listbox size of a combo-box? By
>default it is the height of one row. I can't seem to find any options in
>the resource editor or in the CComboBox class member list.
>
>Tom
>

Tom,

If you click on a drop-down arrow of a cobmo-box in a resource editor,
you will be able to resize it.

Vagif Abilov
va...@sn.no
Object Factory
Oslo Norway

Cecil A. Galbraith

unread,
Oct 18, 1996, 3:00:00 AM10/18/96
to Yury Kosov

Yury Kosov wrote:
>
> Hi Thomas,
> I'm using a little trick here. Change the style of a combobox to simple,
> resize it to the height you'd like it to be, than change the style back to
> dropdown. Drink some beer and enjoy the results. NOTE: beer is optional.
>

Beer is *never* optional...

--
Cecil Galbraith
cgal...@concentric.net
CustomSoft

Download free programmers utilities at
http://www.concentric.net/~cgalbrai/

Kit Enscoe

unread,
Oct 18, 1996, 3:00:00 AM10/18/96
to

Thomas Dietz wrote:
>
> Does anyone know how to set the drop down listbox size of a combo-box? By
> default it is the height of one row. I can't seem to find any options in
> the resource editor or in the CComboBox class member list.
>
> Tom
>
> --
> Thomas W. Dietz tdi...@glis.net
> Chicagoland, IL USA FAX: 630-539-7709
> http://www.pr.ais.net/tdietz

In the resource editor, just click on the down arrow of the combo-box.
A frame appears, which you can then drag to the desired size.

Katy Mulvey

unread,
Oct 19, 1996, 3:00:00 AM10/19/96
to

In article <3267313a.54123004@news> va...@sn.no (Vagif Abilov) wrote:

> tdi...@glis.net (Thomas Dietz) wrote:
>>Does anyone know how to set the drop down listbox size of a combo-box? By
>>default it is the height of one row. I can't seem to find any options in
>>the resource editor or in the CComboBox class member list.
>>Tom
>
> If you click on a drop-down arrow of a cobmo-box in a resource editor,
> you will be able to resize it.
>
> Vagif Abilov

If you want to resize in code, use MoveWindow, which will resize the
drop-down portion, not just the edit box. (The size of the edit box
depends on the font it's using).

katy

Rich or Katy Mulvey
mul...@frontiernet.net


Thomas Dietz

unread,
Oct 21, 1996, 3:00:00 AM10/21/96
to

In article <3267C8...@norwich.net>, Kit Enscoe <ens...@norwich.net> wrote:

>Thomas Dietz wrote:
>>
>> Does anyone know how to set the drop down listbox size of a combo-box? By
>> default it is the height of one row. I can't seem to find any options in
>> the resource editor or in the CComboBox class member list.

>In the resource editor, just click on the down arrow of the combo-box.


>A frame appears, which you can then drag to the desired size.

I have tried that. No matter what size I save it as, it always changes it to
the height of one row (even if there are 10 rows).

Dave Jacobs

unread,
Oct 22, 1996, 3:00:00 AM10/22/96
to

tdi...@glis.net (Thomas Dietz) wrote:

>Does anyone know how to set the drop down listbox size of a combo-box? By
>default it is the height of one row. I can't seem to find any options in
>the resource editor or in the CComboBox class member list.

>Tom

>--
>Thomas W. Dietz tdi...@glis.net
>Chicagoland, IL USA FAX: 630-539-7709
>http://www.pr.ais.net/tdietz


Try clicking on the combo box image in your resource editor. That
should make the combo expand downwards. This expansion is how to set
the dropdown length. I don't know how to do this dynamically during
run time.

Dave


pazi

unread,
Oct 22, 1996, 3:00:00 AM10/22/96
to

tdi...@glis.net wrote:
>Kit Enscoe <ens...@norwich.net> wrote:
>>Thomas Dietz wrote:
>>> Does anyone know how to set the drop down listbox size of a combo-box?
>>In the resource editor, just click on the down arrow of the combo-box.
>>A frame appears, which you can then drag to the desired size.
>
>I have tried that. No matter what size I save it as, it always changes it to
>the height of one row (even if there are 10 rows).

You are not, by any change, experiencing this under Win32s? I had
the same kind of problems, and had to resort to get the dropped
control rect (CB_GETDROPPEDCONTROLRECT) from the combo and then
MoveWindow()ing to that size in OnInitDialog().

-zi


for...@access.digex.net

unread,
Oct 25, 1996, 3:00:00 AM10/25/96
to

tdi...@glis.net (Thomas Dietz) wrote:

>Does anyone know how to set the drop down listbox size of a combo-box? By
>default it is the height of one row. I can't seem to find any options in
>the resource editor or in the CComboBox class member list.

>Tom

In the resource editor, left-clicking on the text portion of the drop
down list box will only let you resize the closed state of the list
box. To resize the "open" state of the list box, left-click on the
pull down box on the right side of the text box. You will get a
different set of sizing handles.

Fernando


Herman Rouge Willett

unread,
Oct 25, 1996, 3:00:00 AM10/25/96
to

FIX IT WITH A TEXT EDITOR, FOUND THIS 2B THE EASIEST

In


article <54huib$n...@newsfeed.icl.fi>, pazi (pa...@to.icl.fi) writes:
>tdi...@glis.net wrote:
>>Kit Enscoe <ens...@norwich.net> wrote:

>>>Thomas Dietz wrote:
>>>> Does anyone know how to set the drop down listbox size of a combo-box?

>>>In the resource editor, just click on the down arrow of the combo-box.
>>>A frame appears, which you can then drag to the desired size.
>>
>>I have tried that. No matter what size I save it as, it always changes it to
>>the height of one row (even if there are 10 rows).
>
> You are not, by any change, experiencing this under Win32s? I had
> the same kind of problems, and had to resort to get the dropped
> control rect (CB_GETDROPPEDCONTROLRECT) from the combo and then
> MoveWindow()ing to that size in OnInitDialog().
>
>-zi
>
>

---
Herman R. Willett
Information Systems Technology Specialist
hrwillet@dynasoft_.win.net
http://www.win.net/~dynasoft_
Herman -- KA5NHE -- Beaumont, Tx
Dynamic Software Systems - Generating Software since 1976
Over 20 years a cyber punk and loving every second of it

K.K.Tsang

unread,
Oct 25, 1996, 3:00:00 AM10/25/96
to

K.K.Tsang wrote :
Does anyone know how to change the listbox's width of a combo-box?
Such that the width of listbox is not equal to the width of the editbox in
a combo-box.
Or, is there any method to get the handle of listbox in a combo-box?
Thanks.

for...@access.digex.net wrote in article <54pf2v$q...@news4.digex.net>...


> tdi...@glis.net (Thomas Dietz) wrote:
>
> >Does anyone know how to set the drop down listbox size of a combo-box?

0 new messages