This is a migrated thread and some comments may be shown as answers.

Setting Initial Tool Window Size

1 Answer 277 Views
Dock
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
Iron
erwin asked on 11 Jun 2009, 09:34 PM
How can I set the initial Tool Window Size when I add a Tool Window to the Manager?
I add first the Tools, then the Documents. The Tools should have a given Minimum Size if possible, the Documents then can adjust.

In the old Docking System I had to use a workaround to set the Size, is that still required?

Regards
Erwin

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 12 Jun 2009, 08:11 AM
Hi Erwin,

Thank you for your interest in the new RadDock.

The layout system was completely revamped and entirely new semantic was introduced. Each SplitPanel has a member SizeInfo, which controls its size and position on the RadSplitContainer. When you have document tabstrips visible, they have SplitPanelSizeMode.Fill, which sets the underlying layout engine in a special mode, somewhat similar to the standard Windows Forms Dock layout but more extended to support nested containers and proportional shrinking whenever there is less available size than the required. So, in your case you may do the following:

RadDock dock = new RadDock();  
ToolWindow window = new ToolWindow("My Tool Window");  
dock.DockWindow(window, DockPosition.Left);  
 
DockTabStrip strip = (DockTabStrip)window.TabStrip;  
strip.SizeInfo.AbsoluteSize = new System.Drawing.Size(100, 100); 

The above code will make the toolwindow hosting tabstrip have a width of 100 pixels. To achieve different layout scenarios, you may use this approach to modify the SizeMode and set different size settings.

Please, do not hesitate to contact us if you need further assistance.

Greetings,
Georgi
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.
Tags
Dock
Asked by
erwin
Top achievements
Rank 1
Veteran
Iron
Answers by
Georgi
Telerik team
Share this question
or