locked
panel control does not show scroll bar RRS feed

  • Question

  • hello

                I have place a windows panel control on windows form . at run time i am creating a dock panel and placing on to it(windows panel). but i can't see the scroll bar if i place more then 15 dock panel in windows panel control. 

     

    how can i set the scroll bar for it 

     


    It's Me

    Tuesday, May 17, 2011 12:05 PM

Answers

  • Have you set the property AutoScroll to true? Ex: panel1.AutoScroll = true;

    Thanks


    Anirban Bhattacharya (Lead Consultant - ESSPL)
    • Marked as answer by It_s Meee Friday, May 20, 2011 7:03 AM
    Tuesday, May 17, 2011 1:15 PM

All replies

  • Have you set the property AutoScroll to true? Ex: panel1.AutoScroll = true;

    Thanks


    Anirban Bhattacharya (Lead Consultant - ESSPL)
    • Marked as answer by It_s Meee Friday, May 20, 2011 7:03 AM
    Tuesday, May 17, 2011 1:15 PM
  • yes but still can't see the scroll bar
    It's Me
    Tuesday, May 17, 2011 1:30 PM
  • Hi

    I did a test. It worked well. Please post your code about creating dock panels and placing into main panel.

    I need to reproduce your issue.

    Have a nice day!


    Cookie Luo[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 19, 2011 2:49 AM
  • There are a few things you should look at. From the Msdn documentation of a ScrollableControl, if you have RightToLeft and AutoScroll both set to true, there is currently a limitation that prevents the control from behaving correctly. In addition, if AutoScroll is set to true, and any of the child controls have their Anchor property set to Anchor.Right, no scrollbar will appear. According to Msdn the workaround is placing the ScrollableControl inside another ScrollableControl. (ie. a Panel inside a Panel).

    You should also note that a scrollable control will not display the scrollbars unless the child controls extend past the physical size of the control, creating a new and larger virtual size.

    Thursday, May 19, 2011 4:49 AM
  • hoho, this topic is from 2011. Any way, i have the same problem today. I can see that if you have a panel in another and if you want that the outer shows the scroll bars, more that says Dave_Anderson, you need to set the Dock property of the inner panel to none. In other way, the outer panel do not show the scroll bars.
    Friday, May 6, 2016 3:20 PM