|
-
September 13th, 1999, 09:08 PM
#1
Combo Box
I had created a ComboBox using :-
handle = CreateWindowEx(...,"COMBOBOX",CBS_DROPDOWNLIST | WS_CHILD,...);
SendMessage(handle,CB_ADDSTRING,0,(LPARAM)(LPSTR)myText);
It created the ComboBox, and it looks fine. BUT when i clicked the ComboBox, the drop down list appears to be one thin line.
I had tried :-
SendMessage(handle,CB_SETITEMHEIGHT,...,...);
and had used several setting but it still appear as a thin line.
Please advice,
Thanks.
chewlim
-
September 14th, 1999, 01:45 AM
#2
Re: Combo Box
To set the height of the dropdown listbox you must use the height of the combobox rectangle.
CreateWindowEx(0, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD,
0, 0, 50, 100 /*=height including dropdown listbox*/, ...);
-
September 14th, 1999, 03:35 AM
#3
Re: Combo Box
Thanks, it works.
But I another problem, the drop down list doesnt have a scroll bar.
When my items get larger, the drop down list only display partial list.
Please advice,
Thanks.
chewlim
-
September 14th, 1999, 03:43 AM
#4
Re: Combo Box
add this WS_VSCROLL o the window style
handle = CreateWindowEx(...,"COMBOBOX",CBS_DROPDOWNLIST | WS_CHILD |WS_VSCROLL ,...);
HTH
kishk91
[email protected]
http://www.path.co.il
-
September 14th, 1999, 03:45 AM
#5
Re: Combo Box
You must create the combobox with the WS_VSCROLL window-style to get a scrollbar.
-
September 14th, 1999, 03:47 AM
#6
Re: Combo Box
Hi, try this:
CreateWindowEx(WS_EX_RIGHTSCROLLBAR, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD,0, 0, 50, 100 );
Good luck,
Oleg.
-
September 14th, 1999, 04:28 AM
#7
Re: Combo Box - Thanks Guys
Thank you for your help...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|