ComboBox cut off
Matt Kimberling aka hardcode -- mattk@ticketmaster.com
Friday, September 13, 1996
Environment: VC++4.1, MFC, Windows NT 4.0
I have a drop-list combo box (styles: visible, tabstop, vertical
scroll, not owner drawn) on a form, immediately above an edit box.
The size of the drop down box is being limited by the edit box
beneath it. There are members to set the width of the drop down, but
not the height.
Here's my question: How can I control the vertical size of the drop
down for a Combo Box? I need it to overlap an edit box immediately
beneath it. Does the Combo create a child window
every time it needs to display the drop down?
Thanks
/////////////////////////////////////////////////////////
Have you hugged your government regulated monopoly today?
Matt Kimberling
mattk@ticketmaster.com
1031021221@compuserve.com
LeRoy Baxter -- lbaxter@transport.com
Saturday, September 14, 1996
[Mini-digest: 2 responses]
1. Did you set the size of the dropdown in the Resource Editor?
[Moderator's note: For all of you asking "How do I do this?", it's
easy. You click the dropdown button (that little button on the
right of the combo box) and the resize handles change to size the
dropdown. This is documented, but many people miss it.]
2. It's my understanding that the drop down portion is a child window. this
can cause problems if you move the dialog when the drop down is
active.
Matt Kimberling (aka hardcode)[SMTP:mattk@ticketmaster.com] wrote:
>Environment: VC++4.1, MFC, Windows NT 4.0
>
>I have a drop-list combo box (styles: visible, tabstop, vertical
>scroll, not owner drawn) on a form, immediately above an edit box.
>
>The size of the drop down box is being limited by the edit box
>beneath it. There are members to set the width of the drop down, but
>not the height.
>
>Here's my question: How can I control the vertical size of the drop
>down for a Combo Box? I need it to overlap an edit box immediately
>beneath it. Does the Combo create a child window
>every time it needs to display the drop down?
>
>Thanks
>
>
>
>
>/////////////////////////////////////////////////////////
>Have you hugged your government regulated monopoly today?
>
>Matt Kimberling
>mattk@ticketmaster.com
>1031021221@compuserve.com
>
-----From: Mike Blaszczak
At 04:37 PM 9/13/96 +0000, you wrote:
>Environment: VC++4.1, MFC, Windows NT 4.0
>
>I have a drop-list combo box (styles: visible, tabstop, vertical
>scroll, not owner drawn) on a form, immediately above an edit box.
>
>The size of the drop down box is being limited by the edit box
>beneath it.
No, it isn't. The size of a combo box with it's drop down is the size
you create for the window. The size of the edit control is based on
the font you're using in the box.
>There are members to set the width of the drop down, but
>not the height.
Create() sets the height and width, initially.
MoveWindow() and SetWindowPos() and probably a couple of other functions
set the width and the heigt after the fact.
>Here's my question: How can I control the vertical size of the drop
>down for a Combo Box? I need it to overlap an edit box immediately
>beneath it.
Then size the combo box so that it covers the edit control your talking about.
>Does the Combo create a child window
>every time it needs to display the drop down?
Yep. Spy++ would show you as much.
.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.
| Вернуться в корень Архива
|