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

Create Floating Forms of type Telerik.WinControls.UI.RadForm

2 Answers 162 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Ken Gonzales
Top achievements
Rank 2
Ken Gonzales asked on 29 Apr 2010, 11:41 PM
Does anyone know how to float a new instance of a Telerik.WinControls.UI.RadForm form programmatically? 

WABOM form = new WABOM(); //a new instance of a Telerik.WinControls.UI.RadForm form.
form.MdiParent = this;
form.Show();

This open a new tabbed document on my raddock.

I have my raddock set to MdiChildrenDockType = ToolWindow;  I'm kinda at a loss right know.  When running the application a can right click on the tab and select floating which works just fine...


2 Answers, 1 is accepted

Sort by
0
Ken Gonzales
Top achievements
Rank 2
answered on 30 Apr 2010, 04:26 PM
OK, as I am new to Telerik there is a bit of a learning curve.  I did manage to solve my own problem though.  The effect I am after is to have one docked tool window on the left of my Mdi form and any other radForm windows to open as floating.  My raddock is set to fill and auto detect mdi children is set to auto.  To achieve this I had to load my new form in a HostWindow and change the dock state of the HOstWindow to Floating.

WABOM form = new WABOM(); 
 
Telerik.WinControls.UI.Docking.HostWindow host = radDock1.DockControl(form, Telerik.WinControls.UI.Docking.DockPosition.Right ); 
 
host.DockState = Telerik.WinControls.UI.Docking.DockState.Floating; 

If someone has a better solution please let me know.


0
Deyan
Telerik team
answered on 06 May 2010, 10:01 AM
Hello Ken Gonzales,

This is the best solution for your scenario. You must dock the Form object using the DockControl API and then change the DockState of HostWindow to Floating or other states.

Best wishes,
Deyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Dock
Asked by
Ken Gonzales
Top achievements
Rank 2
Answers by
Ken Gonzales
Top achievements
Rank 2
Deyan
Telerik team
Share this question
or