CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2007
    Posts
    9

    Combo box drop down width

    Hello

    I am working on C++ using Win32 API’s in Visual Studio 2008 environment, and am using almost all standard Windows controls
    that’s available.

    In the application there’s a Combo box that will show multiple items and have a horizontal and vertical scroll bar.

    There is an option for user, by which the user can choose the number of items shown in combo box.

    The combo box works fine when there more than 2 items to show, the scroll bars work fine.

    But when there’s only one item to show in combo box, the vertical scroll bar is very small. That is, the drop down of the
    combo box is not long enough to have a longer vertical scroll bar.

    That looks like the standard behavior of Windows combo box. But the application that am working on is
    used in a touch screen monitor.

    So the problem with a small vertical scroll bar is that, user will not have enough space to touch and scroll.

    The issue is more complicated is because, the 1st item in the combo box is always a empty string item. This is to make
    sure that there’s no default selection in combo box.

    So anyone has any idea how to have a longer drop down for a combo box with fewer items to display?

    So that the vertical scroll bar is longer.

    Is there a way of overriding Windows Combo box function?

    Like doing a SubclassDlgItem() or some other function?

    Thanks in advance.

  2. #2
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: Combo box drop down width

    In the resource editor...
    Attached Images Attached Images
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  3. #3
    Join Date
    May 2007
    Posts
    9

    Re: Combo box drop down width

    I tried that and that doesn't work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured