Setting the size of a docked toolwindow?

4 posts, 1 answers
  1. Malcolm
    Malcolm avatar
    13 posts
    Member since:
    Oct 2007

    Posted 31 Jan 2011 Link to this post

    Can set the default size for auto hide, but can't seem to set the size for when the window is docked. Would rather set a minimum size on it to make it usable.

    Is there a way to do this?
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 02 Feb 2011 Link to this post

    Hello Stephen,

    you can set the size of your docked ToolWindow in the following way

    Dim window As ToolWindow = Me.ToolWindow1
    Dim strip As DockTabStrip = DirectCast(window.TabStrip, DockTabStrip)
    strip.SizeInfo.AbsoluteSize = New System.Drawing.Size(100, strip.SizeInfo.AbsoluteSize.Height)

    Hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Malcolm
    Malcolm avatar
    13 posts
    Member since:
    Oct 2007

    Posted 02 Feb 2011 Link to this post

    Thanks Richard. Set me on the right path:

    Dim navwin As HostWindow = Me.RadDock1.DockControl(Navigator, Telerik.WinControls.UI.Docking.DockPosition.Left, Telerik.WinControls.UI.Docking.DockType.ToolWindow)
    Dim strip As DockTabStrip = DirectCast(navwin.TabStrip, DockTabStrip)
    strip.SizeInfo.AbsoluteSize = New System.Drawing.Size(300, strip.SizeInfo.AbsoluteSize.Height)

    Works perfect!
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 02 Feb 2011 Link to this post

    Glad I could help. Please remember to mark as answer.
    Thanks
    Richard
Back to Top