ComboBox question

This is a discussion on ComboBox question within the Windows Programming forums, part of the Platform Specific Boards category; How can i make the combobox's list bigger in height, so it displays more than 1 option at a time...At ...

  1. #1
    Registered User
    Join Date
    Nov 2008

    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,

  2. #2
    Registered User
    Join Date
    Mar 2005
    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

  3. #3
    Registered User
    Join Date
    Nov 2008
    hmm ya i tryed that too, but it wont solve the 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...

  4. #4
    Join Date
    Dec 2007
    In your nightmares
    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
    CreateWindowEx(WS_EX_LEFT, "COMBOBOX", "0", CBS_DROPDOWN | 
         140, 65, 350, 500, hwnd, (HMENU)1999, GetModuleHandle(NULL), NULL);
    & Tried to add a string to it:
        SendMessage(GetDlgItem(hwnd, CTRL_OUT), CB_ADDSTRING, 0, (LPARAM)outputstack);
    where char *outputstack = "5607.000000";/ / outputstack can have that value for now
    long time no C; //seige
    You miss 100% of the people you don't C;
    if (language != LANG_C && language != LANG_CPP)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  2. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  3. Win32 COMBOBOX 'Enter' Key??
    By tdk_ratboy in forum Windows Programming
    Replies: 0
    Last Post: 04-17-2004, 06:52 PM
  4. Question...
    By TechWins in forum A Brief History of
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21