Combobox that doesn't drop down

This is a discussion on Combobox that doesn't drop down within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to use comboboxes, but I'm having a hard time to get it to work just right. I'm using ...

  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    9

    Combobox that doesn't drop down

    I'm trying to use comboboxes, but I'm having a hard time to get it to work just right.

    I'm using a combo box with the drop-down property, it's not a simple combobox. In my code, I add strings to the combo box, but not data. When I click the arrow that is supposed to make the list box container drop down, it's empty. However, when I use the arrow keys, I can select the strings that I added to the combo box as well as their indexes.

    So I'm pretty sure it's a problem with the actual list box of the combo box control, and I've tried almost everything I can think of, but I can't seem to find the problem.

    Anyone have any ideas?

    Thanks in advance,
    Chris

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Make sure you set the height of the combobox to include the height of the drop-down list, otherwise the list portion won't show.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Jan 2004
    Posts
    9
    My goodness. And to think I spent hours trying to figure it out. It worked.

    Thank you very much.

  4. #4
    Registered User
    Join Date
    Aug 2004
    Posts
    4
    Hopefully you both are still monitoring this thread.

    I seem to be having th same problem. When I click the arrow on the right that should drop down the box...nothing happens. I am not sure what you meant with the height option. I have no option where I can specify height. I am using ms Visual Studio and the combo box is only allowed to be drawn at with one height (the resize boxes are disable for vertical re-size, it only lets you re-size it horizontally). I then thought maybe you meant that you shouldn't have any control to close udner it to allow room for opening. That didn't help either. What else should I try. Thanks again.

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,674
    In the resource editor, click on the array of the combo box. This will display a sizing rectangle that specifies the height of the drop down listbox.

    gg

  6. #6
    Registered User
    Join Date
    Aug 2004
    Posts
    4
    Got it. Thanks

    Actually what was happening is I had the OwnerDraw setting turned on. As soon as I turned it off everything worked like a charm. Thanks for your response.

  7. #7
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,674
    Cool.

    Clicking on the arrow of the combo box works too

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to create a drop down menu?
    By arian in forum C# Programming
    Replies: 5
    Last Post: 03-29-2009, 11:42 PM
  2. textBox, comboBox
    By Coding in forum C# Programming
    Replies: 4
    Last Post: 02-16-2008, 08:53 PM
  3. Drag and Drop using CImageList, Device contexts and BitBlt
    By MJWhiteman2 in forum Windows Programming
    Replies: 0
    Last Post: 03-03-2005, 06:22 AM
  4. Win32 COMBOBOX 'Enter' Key??
    By tdk_ratboy in forum Windows Programming
    Replies: 0
    Last Post: 04-17-2004, 05:52 PM
  5. Drag and drop from Internet Explorer
    By Echidna in forum Windows Programming
    Replies: 5
    Last Post: 10-02-2002, 02:14 AM

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