Expanding Drop Down List Boxes 
Author Message
 Expanding Drop Down List Boxes



> Please excuse me I'm just posting this because I'm the only one with access to
> newsgroups. We are building a GUI in VC++/MFC. One of the problems is that the
> text for some of the rows in the list of drop down list boxes is too long. The
> guys that are working on this ahve not come up with a way to make the list
> expand to show the full length of the text in the list. There is a constraint as
> to how much of the text will show when the list is closed, not dropped down. but
> when it is selected expanded and in its dropped down it needs to expand to show
> the full length of the text. Is this possable? If so I'd appreciate a pointer to
> some code examples on how to do it.

> jw

I think what you're asking about is the CB_SETHORIZONTALEXTENT message or in an MFC CCombobox, the
SetHorizontalExtent member function.


Please post all follow-ups to the newsgroup only.

Sun, 30 May 2004 07:15:39 GMT  
 Expanding Drop Down List Boxes
See also my self-adjusting listbox on my MVP Tips site. This handles setting the extent
transparently. The same code could be readily modified to support a combo box.

>Thanks Jeff, I'll check this out.


Joseph M. Newcomer [MVP]

Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm

Tue, 01 Jun 2004 00:26:38 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Setting the hight of a list in a combo box (Drop Down List)

2. Setting the hight of a list in a combo box (Drop Down List)

3. Setting the hight of a list in a combo box (Drop Down List)

4. Q: how to put a drop down in a list box dynamically

5. tooltips and in drop-down list box, possible?

6. Can't Get Drop-Down List in Combo Box to Appear

7. Combo Box Drop down list

8. Combo box control automatically drop down the list of items

9. Resize a Drop Down List Box ?

10. change background color of drop down list box

11. Drop Down Boxes in a List View

12. Setting the height of a combo box's drop down list


Powered by phpBB® Forum Software