Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Combo box - Dropdown height?

Combo box - Dropdown height?

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dipuks
    wrote on last edited by
    #1

    Hi Is there a way of setting the height of vertical scroll bar in a Combo box? i.e, dropdown height? i.e., even if there's only one item in the Combo, is it possible to set the height of vertical scroll bar? What i have seen is, if there's only one item, the vertical scroll bar is very small or not at all scrolable. I would like to set it a little longer so that its scrollable. Thanks

    R C 2 Replies Last reply
    0
    • D dipuks

      Hi Is there a way of setting the height of vertical scroll bar in a Combo box? i.e, dropdown height? i.e., even if there's only one item in the Combo, is it possible to set the height of vertical scroll bar? What i have seen is, if there's only one item, the vertical scroll bar is very small or not at all scrolable. I would like to set it a little longer so that its scrollable. Thanks

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      dipuks wrote:

      What i have seen is, if there's only one item, the vertical scroll bar is very small or not at all scrolable. I would like to set it a little longer so that its scrollable.

      What's the point in enabling the scroll if there's only one item? :confused:

      “Follow your bliss.” – Joseph Campbell

      1 Reply Last reply
      0
      • D dipuks

        Hi Is there a way of setting the height of vertical scroll bar in a Combo box? i.e, dropdown height? i.e., even if there's only one item in the Combo, is it possible to set the height of vertical scroll bar? What i have seen is, if there's only one item, the vertical scroll bar is very small or not at all scrolable. I would like to set it a little longer so that its scrollable. Thanks

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        Your question is not really clear because if there is only one item in the dropdown area, the vertical scrollbar is not displayed. You probably mean that you have several items available in the dropdown but only one is visible at a time ? And you would like to increase that so that multiple items are visible at the same time right ? Well, you can correct that through the resource editor: when you select the combo box, click on the part where the arrow is situated, this will let you adjust the height of the dropdown area, and not the size of the control itself.

        Cédric Moonen Software developer
        Charting control [v3.0] OpenGL game tutorial in C++

        D 1 Reply Last reply
        0
        • C Cedric Moonen

          Your question is not really clear because if there is only one item in the dropdown area, the vertical scrollbar is not displayed. You probably mean that you have several items available in the dropdown but only one is visible at a time ? And you would like to increase that so that multiple items are visible at the same time right ? Well, you can correct that through the resource editor: when you select the combo box, click on the part where the arrow is situated, this will let you adjust the height of the dropdown area, and not the size of the control itself.

          Cédric Moonen Software developer
          Charting control [v3.0] OpenGL game tutorial in C++

          D Offline
          D Offline
          dipuks
          wrote on last edited by
          #4

          Cedric, If there are multiple items, it does show a longer vertical scroll bar and thats not the problem. The problem is when there's only 1 item. At that time, the default Windows thing sets the vertical scroll bar height to a set length so that the one item is visible. And this works perfect, and the user can always use the mouse pointer to select. But the issue that am facing is, the application am using will take input from a touch screen. So when using touch screen the smaller vertical scroll bar is an issue. Hope you undertand the issue. Thats the reason why i need a longer vertical scroll bar. Any ideas?

          C 1 Reply Last reply
          0
          • D dipuks

            Cedric, If there are multiple items, it does show a longer vertical scroll bar and thats not the problem. The problem is when there's only 1 item. At that time, the default Windows thing sets the vertical scroll bar height to a set length so that the one item is visible. And this works perfect, and the user can always use the mouse pointer to select. But the issue that am facing is, the application am using will take input from a touch screen. So when using touch screen the smaller vertical scroll bar is an issue. Hope you undertand the issue. Thats the reason why i need a longer vertical scroll bar. Any ideas?

            C Offline
            C Offline
            Cedric Moonen
            wrote on last edited by
            #5

            Well, if there is only one item in your combo box, there's no scrollbar. Why would you need a scrollbar, there's nothing to scroll. Did you understand my reply at least ? Is that what you were looking for of not ? Did you try it ?

            Cédric Moonen Software developer
            Charting control [v3.0] OpenGL game tutorial in C++

            D 1 Reply Last reply
            0
            • C Cedric Moonen

              Well, if there is only one item in your combo box, there's no scrollbar. Why would you need a scrollbar, there's nothing to scroll. Did you understand my reply at least ? Is that what you were looking for of not ? Did you try it ?

              Cédric Moonen Software developer
              Charting control [v3.0] OpenGL game tutorial in C++

              D Offline
              D Offline
              dipuks
              wrote on last edited by
              #6

              Ok i read your last reply. Ok so here's the trick...... the combo box will have technically 2 items, of which the 1st will be a empty item and then a string item. The reason why the 1st one is an empty item is, because thats the default one. So by default the application will not have any selection in the combo unless user makes a selection. So basically there are 2 items and the vertical scroll bar as of now is very very small and its difficult to do a touch screen scroll, even though it works fine with mouse.

              C 1 Reply Last reply
              0
              • D dipuks

                Ok i read your last reply. Ok so here's the trick...... the combo box will have technically 2 items, of which the 1st will be a empty item and then a string item. The reason why the 1st one is an empty item is, because thats the default one. So by default the application will not have any selection in the combo unless user makes a selection. So basically there are 2 items and the vertical scroll bar as of now is very very small and its difficult to do a touch screen scroll, even though it works fine with mouse.

                C Offline
                C Offline
                Cedric Moonen
                wrote on last edited by
                #7

                Well, did you try what I suggested ? Increasing the size of the dropdown area ? By default only one item is visible at a time but you have to increase the height of the dropdown area in order to make multiple elements visible (which will of course also increase the height of the scrollbar if any). You really should try the suggestions that are given to you before replying...

                Cédric Moonen Software developer
                Charting control [v3.0] OpenGL game tutorial in C++

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups