-
ComboBox question
How can i make the combobox's list bigger in height, so it displays more than 1 option at a time...At the moment my combo list displays just 1 option at a time, and id like it to display at least 3 or 4 at a time...i dont know if you understand what im talking about...
Thank you very much,
Cherry
-
You can use a listbox instead of a combobox, is also a list of options but it haven't got the side button to open the dropdown list (instead you can declare the WS_VSCROLL style to let the user to navigate through all the options, and also can set LBS_DISABLENOSCROLL to hide the scroll bar when the list have no hidden options.
Hope that helps
Niara
-
hmm ya i tryed that too, but it wont solve the problem...it still displays 1 option at a time...and the scroll bar is just 2 buttons(1 to go up and the other down), theres no scrollbar...
-
The easiest way is, when declaring the combobox, set the height bigger. The height property of the combobox is actually the height of the list when extended + the height of the combobox. The height of the combobox when the list is not extended is determined by the font size.
Speaking of comboboxes, I can't even get the list to come up.
I declared the combobox as follows
Code:
CreateWindowEx(WS_EX_LEFT, "COMBOBOX", "0", CBS_DROPDOWN |
CBS_AUTOHSCROLL | CBS_DISABLENOSCROLL | CBS_HASSTRINGS | WS_CHILD | WS_VISIBLE,
140, 65, 350, 500, hwnd, (HMENU)1999, GetModuleHandle(NULL), NULL);
& Tried to add a string to it:
Code:
SendMessage(GetDlgItem(hwnd, CTRL_OUT), CB_ADDSTRING, 0, (LPARAM)outputstack);
where char *outputstack = "5607.000000";/ / outputstack can have that value for now