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#
  4. SplitContainer panel scroll bar

SplitContainer panel scroll bar

Scheduled Pinned Locked Moved C#
questiondockerdata-structures
10 Posts 7 Posters 1 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.
  • S Offline
    S Offline
    Surya Ayyagari
    wrote on last edited by
    #1

    I have a split container on the form. On the left panel and right panel I have tree views. I have set the tree view scroll bars to false. When the treeviews increase in size, tthe panels doesn't show any scroll bar even though autoscroll property of the panels are set to true. How can I show the scroll bars of the panel? I need to synchronise both the scroll bars later. Regards Surya

    M M H W 4 Replies Last reply
    0
    • S Surya Ayyagari

      I have a split container on the form. On the left panel and right panel I have tree views. I have set the tree view scroll bars to false. When the treeviews increase in size, tthe panels doesn't show any scroll bar even though autoscroll property of the panels are set to true. How can I show the scroll bars of the panel? I need to synchronise both the scroll bars later. Regards Surya

      M Offline
      M Offline
      musefan
      wrote on last edited by
      #2

      Surya Ayyagari wrote:

      I have set the tree view scroll bars to false.

      What do you mean by that? Do you mean the 'Scrollable' Property?

      Surya Ayyagari wrote:

      tthe panels doesn't show any scroll bar even though autoscroll property of the panels are set to true.

      That because you tree view is not changing size so no need for scrolls,the scroll bars should be in the tree view. All you need to do is have the TreeView Scrollable property set to true (which is the default) and the scrolls bars will appear when they need to. If they don't then you must be doing something else to prevent them.

      Surya Ayyagari wrote:

      I need to synchronise both the scroll bars later.

      Why do they need to be synchronised?

      Life goes very fast. Tomorrow, today is already yesterday.

      realJSOPR 1 Reply Last reply
      0
      • M musefan

        Surya Ayyagari wrote:

        I have set the tree view scroll bars to false.

        What do you mean by that? Do you mean the 'Scrollable' Property?

        Surya Ayyagari wrote:

        tthe panels doesn't show any scroll bar even though autoscroll property of the panels are set to true.

        That because you tree view is not changing size so no need for scrolls,the scroll bars should be in the tree view. All you need to do is have the TreeView Scrollable property set to true (which is the default) and the scrolls bars will appear when they need to. If they don't then you must be doing something else to prevent them.

        Surya Ayyagari wrote:

        I need to synchronise both the scroll bars later.

        Why do they need to be synchronised?

        Life goes very fast. Tomorrow, today is already yesterday.

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        musefan wrote:

        Why do they need to be synchronised?

        It doesn't matter why. If he needs to, he needs to.

        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

        M 1 Reply Last reply
        0
        • S Surya Ayyagari

          I have a split container on the form. On the left panel and right panel I have tree views. I have set the tree view scroll bars to false. When the treeviews increase in size, tthe panels doesn't show any scroll bar even though autoscroll property of the panels are set to true. How can I show the scroll bars of the panel? I need to synchronise both the scroll bars later. Regards Surya

          M Offline
          M Offline
          Mike Ellison
          wrote on last edited by
          #4

          Have you set the Dock property of the treeView to DockStyle.Fill?

          MishaInTheCloud.blogspot.com

          S 1 Reply Last reply
          0
          • realJSOPR realJSOP

            musefan wrote:

            Why do they need to be synchronised?

            It doesn't matter why. If he needs to, he needs to.

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            M Offline
            M Offline
            musefan
            wrote on last edited by
            #5

            John Simmons / outlaw programmer wrote:

            It doesn't matter why. If he needs to, he needs to.

            It does matter as to the answer I may choose to give him. If he says that he just has two identically tree views then I would suggest that it would be best, from a users point of view, to just have one. If he says something like they are used to compare data then I would point out that problems will occur with different numbers of nodes (for example, you cant scroll to the 100th node on a TreeView that only has 50 nodes etc.) As I am sure you are aware, there are a lot of people new to the subject of programming (not to suggest the OP is new) that use these forums. Sometimes it can be more helpful to question a persons design choices in order to illustrate better solutions for the future. if somebody gave the example like follows with the question how do I make i3 be the sum of i2 and s1, I need to convert s1 to a number to add to i1...

            int i1 = 2;
            int i2 = 3;
            string s1 = "" + i1;
            Console.Write("i1 = " + s1);
            int i3 = i1 + s1;//<- this does not work, please help me

            Would you suggest...

            int i3 = i1 + int.Parse(s1);

            ..or would you point out how they could do it more efficiently?

            Life goes very fast. Tomorrow, today is already yesterday.

            1 Reply Last reply
            0
            • S Surya Ayyagari

              I have a split container on the form. On the left panel and right panel I have tree views. I have set the tree view scroll bars to false. When the treeviews increase in size, tthe panels doesn't show any scroll bar even though autoscroll property of the panels are set to true. How can I show the scroll bars of the panel? I need to synchronise both the scroll bars later. Regards Surya

              H Offline
              H Offline
              Henry Minute
              wrote on last edited by
              #6

              Please don't post in two forums! Very rude, have a little patience. :)

              Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

              S 1 Reply Last reply
              0
              • H Henry Minute

                Please don't post in two forums! Very rude, have a little patience. :)

                Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                S Offline
                S Offline
                Surya Ayyagari
                wrote on last edited by
                #7

                Sorry Henry. I thought I posted at the wrong place so I posted again. Still no solution for this... Regards Surya

                1 Reply Last reply
                0
                • M Mike Ellison

                  Have you set the Dock property of the treeView to DockStyle.Fill?

                  MishaInTheCloud.blogspot.com

                  S Offline
                  S Offline
                  Surya Ayyagari
                  wrote on last edited by
                  #8

                  I have set the DockStyle as DockStyle.Fill. But still I am unable to see the scroll bars even though the tree view is completly loaded. I can select the nodes which are not visible, but the scroll bars of the panels doesn't appear :( Regards Surya

                  1 Reply Last reply
                  0
                  • S Surya Ayyagari

                    I have a split container on the form. On the left panel and right panel I have tree views. I have set the tree view scroll bars to false. When the treeviews increase in size, tthe panels doesn't show any scroll bar even though autoscroll property of the panels are set to true. How can I show the scroll bars of the panel? I need to synchronise both the scroll bars later. Regards Surya

                    W Offline
                    W Offline
                    Waseem Chishti
                    wrote on last edited by
                    #9

                    I ran into the same thing but couldn't find any suitable answer, at last figured it out on my own. Adding it here, it might help somebody else. Scroll bars appear when child's size increases or it goes out of the bounds of parent. But when you set the Dock Property of child (in this case TreeView) to Fill, the splitter, when resized, changes the size of its child as well. hence no scroll bar will appear. If you must set the Dock property then use AutoScrollMinSize property of parent.

                    W 1 Reply Last reply
                    0
                    • W Waseem Chishti

                      I ran into the same thing but couldn't find any suitable answer, at last figured it out on my own. Adding it here, it might help somebody else. Scroll bars appear when child's size increases or it goes out of the bounds of parent. But when you set the Dock Property of child (in this case TreeView) to Fill, the splitter, when resized, changes the size of its child as well. hence no scroll bar will appear. If you must set the Dock property then use AutoScrollMinSize property of parent.

                      W Offline
                      W Offline
                      Waqar Uddin
                      wrote on last edited by
                      #10

                      Hi Thank you. it really helped me. I was stucked in situation which you have faced and i found this reply. thanks again

                      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