The "best" scroll-able layout.

2 posts, 0 answers
  1. Artem
    Artem avatar
    16 posts
    Member since:
    May 2013

    Posted 08 Jul 2012 Link to this post

    Hi, Telerik team.
    I browsed few examples and forum posts, have experimented a bit, but had no luck to clarify this topic for myself.
    Building an application with tool windows I have some issues with resizing those windows and seeing the tools in them.
    Please, if you can help me - I will be very happy.

    I know that I am going to ask quite basic things, so If you know where can I read about those things - let me know.

    So, I have Telerik.WinControls.UI.Docking.ToolWindow named toolWindow
    and I have MyUserControl userControl placed right into toolWindow
    I want my userControl to be at list 400*200 pixels always, e.g. its MinimumSize = 400,200

    My requested behavior is appearance of scroll bars if I resize toolWindow under those limits. 

    I have discovered that the following things have influence on this issue:
    1) Structure of user control itself. If it has scrollable panel inside or not, if controls inner container is docked to fill or anchored somehow.
    2) Whether I place control right into window or I place scrollable panel into window before control.

    I am quite lost in options and properties and cannot define the rules. Can you tell me how it should be done in the right way? Some pattern perhaps.

    Thank you in advance, regards.
  2. Stefan
    Stefan avatar
    2891 posts

    Posted 11 Jul 2012 Link to this post

    Hi Artem,

    Thank you for writing.

    The easiest way to have scroll bars in this case is to put a RadScrollablePanel docked Fill in the ToolWindow and then add your UserControl in this panel. Here is a sample:
    public Form1()
               ToolWindow tw = new ToolWindow();
               radDock1.DockWindow(tw, DockPosition.Left);
               RadScrollablePanel sPanel = new RadScrollablePanel();
               sPanel.Dock = DockStyle.Fill;
               sPanel.Controls.Add(new UserControl1());

    Let me know if you have any other questions.
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  3. DevCraft R3 2016 release webinar banner
Back to Top