Combo box vertical size adjustment 
Author Message
 Combo box vertical size adjustment

Okay, I've got a combo box with a horizontal scroll bar.  When I populate
the list and drop the list down, the vertical size is automatically reduced
to fit the number of items I've inserted (typically it's only two).

The problem is when the width of some items requires that a horizontal
scroll bar be displayed in the drop down list.  The vertical size of this
scroll bar is not taken into account when the list is displayed.  There's
only vertical space for one of the two list items, and now there's a
miniscule vertical scroll bar.  How can I defeat this behavior? BTW I'm
writing in MFC. Thanks.

(Whinge: Why is there no "horizontal scroll" check box in VC6's resource
editor for combo boxes?  I have to edit the .RC file to add WS_HSCROLL
manually.  Gripe gripe gripe.)

--
Richard Krehbiel, Arlington, VA, USA



Sun, 26 Oct 2003 22:21:15 GMT  
 Combo box vertical size adjustment
I think you haven't yet discovered the SetHorizontalExtent function!


Sun, 26 Oct 2003 22:33:26 GMT  
 Combo box vertical size adjustment
Hi Richard..

        Select the  combo box in the resource editor and click the arrow
button in the combo box.
        Now increase the height of the combo box { so that more than 2 items
will be shown }
        by dragging the outline handles shown.

Cheers
Check Abdoul
-----------------


Quote:
> Okay, I've got a combo box with a horizontal scroll bar.  When I populate
> the list and drop the list down, the vertical size is automatically
reduced
> to fit the number of items I've inserted (typically it's only two).

> The problem is when the width of some items requires that a horizontal
> scroll bar be displayed in the drop down list.  The vertical size of this
> scroll bar is not taken into account when the list is displayed.  There's
> only vertical space for one of the two list items, and now there's a
> miniscule vertical scroll bar.  How can I defeat this behavior? BTW I'm
> writing in MFC. Thanks.

> (Whinge: Why is there no "horizontal scroll" check box in VC6's resource
> editor for combo boxes?  I have to edit the .RC file to add WS_HSCROLL
> manually.  Gripe gripe gripe.)

> --
> Richard Krehbiel, Arlington, VA, USA




Sun, 26 Oct 2003 22:37:39 GMT  
 Combo box vertical size adjustment
Au contrare, I'm using SetHorizontalExtent fluently (unlike my French) to
control the horozontal scrolling extents.  That part works perfectly.

What doesn't work so well is that there's no accounting for the vertical
size of the horizontal scroll bar when it shows up.

--
Richard Krehbiel, Arlington, VA, USA



Quote:
> I think you haven't yet discovered the SetHorizontalExtent function!



Sun, 26 Oct 2003 22:57:42 GMT  
 Combo box vertical size adjustment
Already did that - actually I had done that about six years ago, when I
first composed the dialog in question.  Well, just recently (yesterday) the
potential width of list elements grew, and I'm adding the code to enable the
horizontal scroll bar.


Quote:
> Hi Richard..

>         Select the  combo box in the resource editor and click the arrow
> button in the combo box.
>         Now increase the height of the combo box { so that more than 2
items
> will be shown }
>         by dragging the outline handles shown.

--
Richard Krehbiel, Arlington, VA, USA



Sun, 26 Oct 2003 23:00:42 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Q. Combo box vertical size

2. combo boxes redraw with focus when sized

3. Modification of RDO Combo Box controls increases EXE file size

4. owner-draw combo box does not change its size

5. Dynamic Combo-box sizing

6. Sizing a Combo Box

7. Size of owner-draw combo box

8. Combo-Box scrolling list size.

9. List with columns containing both text and combo boxes / check boxes

10. CFindReplaceDialog,search box ->combo box

11. Add Combo Box to Dialog Box

12. Add a combo box in a dialog box...

 

 
Powered by phpBB® Forum Software