Dock 2 Tool Windows on the left

5 posts, 0 answers
  1. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 15 Jun 2009 Link to this post

    Hello,

    What's the best way to provide an initial layout (by code, not using the designer) with two tool windows docked on the left side - the upper one taking about 2/3 of the available height.

    Thanks for your help.
    erwin
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 15 Jun 2009 Link to this post

    Hi erwin,

    Thank you for the question.

    In order to dock the ToolWindows in the desired way, you should first dock one ToolWindow to the left and then dock another ToolWindow to the bottom, giving the first ToolWindow as a target
    ToolWindow toolWind1 = new ToolWindow();  
    toolWind1.Text = "ToolWindow1";  
    this.radDock1.DockWindow(toolWind1, DockPosition.Left);  
     
    ToolWindow toolWind2 = new ToolWindow();  
    toolWind2.Text = "ToolWindow2";  
    this.radDock1.DockWindow(toolWind2, toolWind1, DockPosition.Bottom); 

    Further, there are two ways to set the desired height:
    • Using Relative SizeMode:
      toolWind2.TabStrip.SizeInfo.RelativeRatio = new SizeF(0, 0.33f);  
      toolWind2.TabStrip.SizeInfo.SizeMode = SplitPanelSizeMode.Relative; 
    • Using Absolute SizeMode:
      toolWind2.TabStrip.SizeInfo.AbsoluteSize = new Size(0, 55);  
      toolWind2.TabStrip.SizeInfo.SizeMode = SplitPanelSizeMode.Absolute; 

    Please note that we do not set the height of the ToolWindow directly, but we are acutally setting the height of the ToolWindow parent container - a TabStripPanel which holds one or more ToolWindows.

    If you have additional questions, feel free to contact me.

    Greetings,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 17 Jun 2009 Link to this post


    Creating the 2 tool windows works, thank you.

    Now how can I set the bottom window autohide to hide to the left (default is to hide to the bottom(?)).

    I would like to have the two tool windows both autohiding to left. If one autohides, the other should expand to the full height.
    If both are hidden, the tabs should be on the left side.

    regards
    erwin
  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 22 Jun 2009 Link to this post

    Hi erwin,

    This behavior is already changed and you will have both windows hiding to the left, but not as it is in Q2 2009 Beta where the bottom window is hiding to the bottom.

    Thank you for the feedback.

    All the best,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 22 Jun 2009 Link to this post

    That's good news.

    Regards
    Erwin
Back to Top
UI for WinForms is Visual Studio 2017 Ready