This is a migrated thread and some comments may be shown as answers.
Setting the size of a docked toolwindow?
11 Answers 96 Views
This is a migrated thread and some comments may be shown as answers.
Malcolm
Top achievements
Rank 1
Malcolm asked on 31 Jan 2011, 03:15 PM
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?

11 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 02 Feb 2011, 01:19 PM
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
0
Malcolm
Top achievements
Rank 1
answered on 02 Feb 2011, 02:23 PM
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!
0
Richard Slade
Top achievements
Rank 2
answered on 02 Feb 2011, 02:30 PM
Glad I could help. Please remember to mark as answer.
Thanks
Richard
0
Raji
Top achievements
Rank 1
answered on 04 Jan 2018, 12:57 PM

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.

0
Dess | Tech Support Engineer, Sr.
Telerik team
answered on 04 Jan 2018, 02:44 PM
Hello, Raji, 

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
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Raji
Top achievements
Rank 1
answered on 04 Jan 2018, 03:04 PM

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.

 

0
Dess | Tech Support Engineer, Sr.
Telerik team
answered on 05 Jan 2018, 07:18 AM
Hello, Raji, 

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
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Raji
Top achievements
Rank 1
answered on 06 Jan 2018, 05:17 AM
that it was I was doing, but its still crashing, so I redesigned the form from scratch for now at that worked.
0
Dess | Tech Support Engineer, Sr.
Telerik team
answered on 08 Jan 2018, 10:54 AM
Hello, Raji, 

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
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Gh Reza
Top achievements
Rank 1
answered on 21 Apr 2020, 02:59 PM

Hi dear admin !

Can i fix radDock toolwindow size ?

I want  restrict toolwindow minimum or maximum size on runtime by user.

0
Nadya
Telerik team
answered on 24 Apr 2020, 07:44 AM

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Dock
Asked by
Malcolm
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Malcolm
Top achievements
Rank 1
Raji
Top achievements
Rank 1
Dess | Tech Support Engineer, Sr.
Telerik team
Gh Reza
Top achievements
Rank 1
Nadya
Telerik team
Share this question
or