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

How do I change tab from code?

1 Answer 81 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Per
Top achievements
Rank 1
Per asked on 04 Aug 2009, 04:49 PM
Hi!

I have a main form that is set to contain MDI child forms.
In this form I have added a dock control and set it to auto detect mdi.
I then add mdi childs to the main form and the dock control displays them as tabs, perfect :)

But.... How can I change active tab from source code?

(I'm using 2009 Q2 SP1)

Regards
Per
 

1 Answer, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 05 Aug 2009, 09:51 AM
Hi Per,

Thank you for contacting us. Please, refer to the following snippet:

this.radDock1.ActivateWindow(this.radDock1.DockWindows[2]);  
//or  
this.radDock1.ActivateWindow((DockWindow)MDIChildForm.Parent);  

The first approach activates the DockWindow that contains the given MDIChildForm using index. A more convenient approach uses the MDIChildForms parent, which in the current situation is the DockWindow that contains the MDIChildForm.

I hope this is helpful. If you have further questions, do not hesitate to contact me back.

Kind regards,
Boryana
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
Per
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Share this question
or