Combobox Size

Combobox Size

Postby TimStone » Sat Sep 19, 2009 12:38 am

I've noticed this for a long time ... never found an answer to it.

If I have a series of controls defined in an .rc file, all with a vertical size of 10, if one is a combobox, dropdown, then on the actual dialog it will be a larger then the other edit fields. It appears to be 12 to 14 high rather then 10 like the other items.

Any thoughts on this ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Combobox Size

Postby Enrico Maria Giordano » Sat Sep 19, 2009 12:18 pm

The height of a combobox is tied to the font used, as far as I know.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Combobox Size

Postby James Bott » Sat Sep 19, 2009 1:51 pm

Tim,

I agree with Enrico.

Also, some comboboxes contain a Get so you may be able to change oCmbo:oGet:nHeight. I haven't tried this.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Combobox Size

Postby TimStone » Mon Sep 21, 2009 6:36 pm

It just looks bad. The same font is used for edits and comboboxes !

In the code, we use:

REDEFINE COMBOBOX abcITEMS aCol ID 2211 OF oDvm STYLE CBS_DROPDOWN MESSAGE "Enter the color of this unit" UPDATE

And the RC is:

CONTROL "", 2211, "ComboBox", WS_BORDER|CBS_DROPDOWN|WS_VSCROLL|WS_TABSTOP, 368,41,110, 264

We have to use 264 to allow enough vertical length for the data to display. However all GET edit boxes have a height of 10.

It would be nice to have them uniform.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Combobox Size

Postby James Bott » Mon Sep 21, 2009 7:34 pm

Tim,

Did you try:

oCmbo:oGet:nHeight := 10
oCmbo:oGet:refresh()

Or you may have to do:

oCmbo:oGet:setSize( oCmbo:oGet:nWidth, 10, .t. )

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Combobox Size

Postby TimStone » Mon Sep 21, 2009 11:10 pm

Actually I found that setting the height of my edit boxes on the dialog is probably easiest. I have them set to 13 and they now match the combo box.

I'm manually realligning all the dialogs ... so it actually cleans up nicely and makes the screens easier to read. I think my clients will be pleased.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Combobox Size

Postby Enrico Maria Giordano » Tue Sep 22, 2009 7:18 am

That's the height I use too.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: cmsoft and 67 guests