11 Answers, 1 is accepted
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
Support should consider adding this to this help topic
Building an Advanced Layout at Runtime - WinForms Dock Control - Telerik UI for WinForms
So, when the first two windows are added, a custom width is set to the docked window. It would be a lot easier to find. It took me nearly 20 minutes just to find this.
Hi, Kris, Note that the DockTabStrip is a derivative of SplitPanel. Hence, the sizing mechanism would be very similar to the one for the SplitPanel. The following help articles are quite useful on this topic:
https://docs.telerik.com/devtools/winforms/controls/splitcontainer/building-advanced-layouts
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!
Thanks
Richard
I create a new tab, to a raddock, but when I try and switch back to another tab, I get
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.WinControls.UI.Docking.DockTabStrip.ProcessFocusRequested(RadElement element)
How do i fix this?
Thanks.
Thank you for writing.
The provided information is not enough for me to replicate the problem locally. Could you please specify the exact steps how to reproduce the problem? Alternatively, you can submit a support ticket with a complete description of the precise case and provide a sample project demonstrating the exception. Thus, we would be able to make an adequate analysis of your scenario and assist you further. Thank you in advance.
I am looking forward to your reply.
Regards,
Dess
Progress Telerik
I have a document container with 3 tabs on it as the attached snap show. Each of them works fine right now, and I can switch between them.
I needed to add another one. From the radDock tab I clicked and did, "Add Tabbed Document". This works fine.
Whens I run the code though, when I try and click on the other tabs it crashes, and the I get the above stack trace.
Thank you for writing back.
Following the provided information, I tried to replicate the error but without any success. Please refer to the attached gif file illustrating the behavior on my end. Am I missing something? I have also attached my sample project. Is it possible to provide a video demonstrating what steps do I need to perform in order to obtain the unexpected behavior? Thank you in advance for your cooperation.
I am looking forward to your reply.
Regards,
Dess
Progress Telerik
Thank you for writing back.
I am glad that after redesigning the problem you were facing has gone.
If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
Hi dear admin !
Can i fix radDock toolwindow size ?
I want restrict toolwindow minimum or maximum size on runtime by user.
Hello Gh Reza,
Thank you for writing.
In order to restrict the size of a toolwindow, you can use the MinimumSize and MaximumSize properties. Here is an example that demonstrates how you can fix the tool windows height:
public RadForm1()
{
InitializeComponent();
ToolWindow window1 = new ToolWindow();
ToolWindow window2 = new ToolWindow();
ToolWindow window3 = new ToolWindow();
this.radDock1.DockWindow(window1, DockPosition.Top);
this.radDock1.DockWindow(window2, DockPosition.Top);
this.radDock1.DockWindow(window3, DockPosition.Top);
window1.TabStrip.SizeInfo.MinimumSize = new System.Drawing.Size(0, 100);
window2.TabStrip.SizeInfo.MinimumSize = new System.Drawing.Size(0, 100);
window3.TabStrip.SizeInfo.MinimumSize = new System.Drawing.Size(0, 100);
window1.TabStrip.SizeInfo.MaximumSize = new System.Drawing.Size(0, 300);
window2.TabStrip.SizeInfo.MaximumSize = new System.Drawing.Size(0, 300);
window3.TabStrip.SizeInfo.MaximumSize = new System.Drawing.Size(0, 300);
}
Additional information about RadDoc is available in the following help article: https://docs.telerik.com/devtools/winforms/controls/dock/object-model/example-building-an-advanced-layout-at-runtime
I hope this helps. Should you have other questions do not hesitate to ask.
Regards,
Nadya
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.