Results 1 to 3 of 3

Thread: [RESOLVED] ComboBox Not Displaying ScrollBars

  1. #1

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,961

    Resolved [RESOLVED] ComboBox Not Displaying ScrollBars

    I have a ComboBox that I am displaying the letters A-Z the DropDownStyle is set to DropDownList, the MaxDropDownItems is set to 5, and this is how I'm adding the items:
    Code:
    Dim columns = Enumerable.Range(Asc("A"c), 26).Select(Function(i) DirectCast(Chr(i), Object)).ToArray()
    ComboBoxCellColumn.Items.AddRange(columns)
    The issue is that when I click on the ComboBox to open it, it tries to render every item without any scrollbars. What makes this really bad is that because of my font size, some of the items are pushed off screen. See image below.

    Why isn't the MaxDropDownItems being respected and is there any way to force scrollbars to be visible?
    Name:  combobox.jpg
Views: 264
Size:  45.2 KB
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  2. #2
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,322

    Re: ComboBox Not Displaying ScrollBars

    https://stackoverflow.com/questions/...he-click-event

    It is a C# thread but suggests setting the IntegralHeight property of the ComboBox to False.

  3. #3

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,961

    Re: ComboBox Not Displaying ScrollBars

    Wow, I am actually mad that it works. It seems like the comment in the solution seems to have the same thoughts:
    WOW! When IntegralHeight is true MaxDropDownItems does not seem to work at all. I don't see how there is a relationship. My combobox went from taking up the whole screen, to properly limiting to 8 items...? This must be a .NET bug... seen in .NET 4.8 VS 2022
    Thank you, I'll mark this as resolved.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

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