Hi,
I tried to set a fixed size for a HostWindow just as ToolWindow. However, even I applied the following code, the width of the HostWindow is still changeable. I am using Rad Controls for WinForms Q1 2010.
DockTabStrip aHostWindow= (DockTabStrip)aHostWindow.TabStrip;
aHostWindow.SizeInfo.SizeMode = SplitPanelSizeMode.Absolute;
aHostWindow.SizeInfo.AbsoluteSize = new System.Drawing.Size(180, aHostWindow.SizeInfo.AbsoluteSize.Height);
Thanks!
I tried to set a fixed size for a HostWindow just as ToolWindow. However, even I applied the following code, the width of the HostWindow is still changeable. I am using Rad Controls for WinForms Q1 2010.
DockTabStrip aHostWindow= (DockTabStrip)aHostWindow.TabStrip;
aHostWindow.SizeInfo.SizeMode = SplitPanelSizeMode.Absolute;
aHostWindow.SizeInfo.AbsoluteSize = new System.Drawing.Size(180, aHostWindow.SizeInfo.AbsoluteSize.Height);
Thanks!
7 Answers, 1 is accepted
0
Hello Blue Chen,
Thank you for your question.
The AbsoluteSize of DockTabStrip will apply when RadDock is initially displayed and you will still be able to resize the window. To prevent the window from resizing, you can set minimum and maximum size of DockTabStrip:
I hope it helps.
Best regards,
Alexander
the Telerik team
Thank you for your question.
The AbsoluteSize of DockTabStrip will apply when RadDock is initially displayed and you will still be able to resize the window. To prevent the window from resizing, you can set minimum and maximum size of DockTabStrip:
DockTabStrip dockTabStrip = (DockTabStrip)
this
.aHostWindow.TabStrip;
dockTabStrip.SizeInfo.MinimumSize =
new
System.Drawing.Size(180, dockTabStrip.SizeInfo.AbsoluteSize.Height);
dockTabStrip.SizeInfo.MaximumSize =
new
System.Drawing.Size(180, dockTabStrip.SizeInfo.AbsoluteSize.Height);
I hope it helps.
Best regards,
Alexander
the Telerik team
0
Blue Chen
Top achievements
Rank 1
answered on 17 Jun 2011, 09:29 AM
Hi Alexander,
Thank you very much for your quick reply.
I tried your solution and the width of the HostWindow became fixed. But a new problem came out: the height of the HostWindow was set to 200 and became uncontrollable. How to set the height of the host window appropriately?
Thank you very much for your quick reply.
I tried your solution and the width of the HostWindow became fixed. But a new problem came out: the height of the HostWindow was set to 200 and became uncontrollable. How to set the height of the host window appropriately?
0
Hello Blue Chen,
Thank you for writing back.
The solution illustrated in my previous post fixes both the width and height of the window. You can fix only its width using the following code snippet:
I hope it helps.
Best regards,
Alexander
the Telerik team
Thank you for writing back.
The solution illustrated in my previous post fixes both the width and height of the window. You can fix only its width using the following code snippet:
DockTabStrip dockTabStrip = (DockTabStrip)this.aHostWindow.TabStrip;
dockTabStrip.SizeInfo.MinimumSize = new System.Drawing.Size(180, 0);
dockTabStrip.SizeInfo.MaximumSize = new System.Drawing.Size(180, 0);
I hope it helps.
Best regards,
Alexander
the Telerik team
0
Steve
Top achievements
Rank 1
answered on 21 Dec 2011, 02:32 AM
I am currently having an issue with setting the MinimumSize to anything. no matter what I set it to it will do nothing.
Am I doing something wrong here?
Thanks,
Steve
private
static
readonly
Size WindowSize =
new
Size(800, 540);
this
.Host.TabStrip.SizeInfo.AbsoluteSize = WindowSize;
this
.Host.TabStrip.SizeInfo.MinimumSize = WindowSize;
Am I doing something wrong here?
Thanks,
Steve
0
Hello Steve,
Your code looks OK. I tested it with our latest release Q3 2011 SP1 and with Q3 and everything looks OK. Maybe there is something related with your application. Please, could you send it to us. We will investigate the issue further and we will try to find a proper solution.
I am looking forward to your reply.
All the best,
Jack
the Telerik teamQ3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
Your code looks OK. I tested it with our latest release Q3 2011 SP1 and with Q3 and everything looks OK. Maybe there is something related with your application. Please, could you send it to us. We will investigate the issue further and we will try to find a proper solution.
I am looking forward to your reply.
All the best,
Jack
the Telerik teamQ3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Steve
Top achievements
Rank 1
answered on 27 Dec 2011, 06:24 PM
Unfortunately I cannot send my program to you due to company regulations, but I am using 2011 Q2 still (can't upgrade till we're done with current version of our program). Could there have been a known issue with the minimum size in that release? Also if you know of any other code snippets that mat interest you I can probably send those.
0
Hi Steve,
Thank you for writing back.
I was not able to find any issues related to yours in the list with the resolved issues for the Service Pack. What I can suggest is to try to isolate the issue in a sample application and provide us with it. Alternatively, if you cannot manage to isolate the issue in a sample project, what we can do is to sing an Non Disclosure Agreement in order to allow you to provide us with your project without worrying about your intellectual property. No matter which approach you decide to go with, please open a support ticket and provide reference to this forum thread. The support thread will allow you to attach files and will protect any private data disclosure.
Greetings,
Stefan
the Telerik teamQ3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
Thank you for writing back.
I was not able to find any issues related to yours in the list with the resolved issues for the Service Pack. What I can suggest is to try to isolate the issue in a sample application and provide us with it. Alternatively, if you cannot manage to isolate the issue in a sample project, what we can do is to sing an Non Disclosure Agreement in order to allow you to provide us with your project without worrying about your intellectual property. No matter which approach you decide to go with, please open a support ticket and provide reference to this forum thread. The support thread will allow you to attach files and will protect any private data disclosure.
Greetings,
Stefan
the Telerik teamQ3’11 of RadControls for WinForms is available for download (see what's new). Get it today.