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. regarding list box in vc++

regarding list box in vc++

Scheduled Pinned Locked Moved C / C++ / MFC
c++
12 Posts 5 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.
  • H haasini

    Hi, I am new to VC++. I have a list box in my window, i have checked the properties 'Horizontal scroll' 'Vertical scroll' and also 'Disble no scroll', to true. But when I run the application, the scroll bars are disabled. Please let me know where I went wrong. regards haasini

    V Offline
    V Offline
    velayudhan_raj
    wrote on last edited by
    #3

    Actually, the scroll bars will be enabled only if there are more items to be displayed in the list box. Please check after inserting more items in the List box. Regards Velayudhan

    H 1 Reply Last reply
    0
    • H haasini

      Hi, I am new to VC++. I have a list box in my window, i have checked the properties 'Horizontal scroll' 'Vertical scroll' and also 'Disble no scroll', to true. But when I run the application, the scroll bars are disabled. Please let me know where I went wrong. regards haasini

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #4

      How many items in your listbox?

      _**


      **_

      WhiteSky


      H 1 Reply Last reply
      0
      • P Programm3r

        Hi, But if you set the 'Horizontal scroll' 'Vertical scroll' to 'Disble no scroll', the scroll bars will be disabled. Cause your telling the compiler that you won't be using then by: 'Disble no scroll'. Well, that is if I understand your question correctly. Hope it helps.

        Only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r

        P Offline
        P Offline
        Programm3r
        wrote on last edited by
        #5

        Right ... After futher investigation ... How many items are in your list box, cause if there were only one | two, the scroll bars will be disabled, depending on the vertical size of the list box.

        Only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r

        H 1 Reply Last reply
        0
        • V velayudhan_raj

          Actually, the scroll bars will be enabled only if there are more items to be displayed in the list box. Please check after inserting more items in the List box. Regards Velayudhan

          H Offline
          H Offline
          haasini
          wrote on last edited by
          #6

          Thanq for the response.. I have many items in the list box, but only Vertical scroll is enabled.. horizontal scroll is not enabled though the text is exceeding the width of listbox.. regards haasini

          1 Reply Last reply
          0
          • H Hamid Taebi

            How many items in your listbox?

            _**


            **_

            WhiteSky


            H Offline
            H Offline
            haasini
            wrote on last edited by
            #7

            Thanq for the response.. I have many items in the list box, but only Vertical scroll is enabled.. horizontal scroll is not enabled though the text is exceeding the width of listbox.. regards haasini

            H 1 Reply Last reply
            0
            • P Programm3r

              Right ... After futher investigation ... How many items are in your list box, cause if there were only one | two, the scroll bars will be disabled, depending on the vertical size of the list box.

              Only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r

              H Offline
              H Offline
              haasini
              wrote on last edited by
              #8

              Thanq for the response.. I have many items in the list box, but only Vertical scroll is enabled.. horizontal scroll is not enabled though the text is exceeding the width of listbox.. regards haasini

              P 1 Reply Last reply
              0
              • H haasini

                Thanq for the response.. I have many items in the list box, but only Vertical scroll is enabled.. horizontal scroll is not enabled though the text is exceeding the width of listbox.. regards haasini

                P Offline
                P Offline
                Programm3r
                wrote on last edited by
                #9

                Ok, so if I understand it correctly ... both of the scroll bars (Vertical & Horizontal) (in their properties) are enabled? And you have text that is exceeding the vertical and horizontal width | height of the object? Just for interrest what complirer are you using?

                Only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r

                1 Reply Last reply
                0
                • H haasini

                  Hi, I am new to VC++. I have a list box in my window, i have checked the properties 'Horizontal scroll' 'Vertical scroll' and also 'Disble no scroll', to true. But when I run the application, the scroll bars are disabled. Please let me know where I went wrong. regards haasini

                  V Offline
                  V Offline
                  Viorel
                  wrote on last edited by
                  #10

                  It seems the horizontal bar cannot be used as you expected. It is supported by the list box only in case of multicolumn lists, and does not perform horizontal scrolling for long items. I think you can try an alternative solution based on "list control" instead of "list box" (available in Dialog Editor too). When a list control is used in Report mode, it looks like a list box with or without header, but with new features, like horizontal scrolling. I hope this helps.

                  H 1 Reply Last reply
                  0
                  • V Viorel

                    It seems the horizontal bar cannot be used as you expected. It is supported by the list box only in case of multicolumn lists, and does not perform horizontal scrolling for long items. I think you can try an alternative solution based on "list control" instead of "list box" (available in Dialog Editor too). When a list control is used in Report mode, it looks like a list box with or without header, but with new features, like horizontal scrolling. I hope this helps.

                    H Offline
                    H Offline
                    haasini
                    wrote on last edited by
                    #11

                    Hi.. Thanks a lot for the reply.. I ll try with listcontrol and get back to u if i have any problem.. regards haasini :)

                    1 Reply Last reply
                    0
                    • H haasini

                      Thanq for the response.. I have many items in the list box, but only Vertical scroll is enabled.. horizontal scroll is not enabled though the text is exceeding the width of listbox.. regards haasini

                      H Offline
                      H Offline
                      Hamid Taebi
                      wrote on last edited by
                      #12

                      I suggest use from CListCtrl its better than CListBox

                      _**


                      **_

                      WhiteSky


                      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