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

How to programatically select a specific tab?

1 Answer 96 Views
Dock
This is a migrated thread and some comments may be shown as answers.
rjmorton
Top achievements
Rank 1
rjmorton asked on 24 Feb 2011, 09:38 PM
Have been scratching my head a little over this one for a while, so I thought I would ask the question here on the forums!

If I have a radDock that has for example 3 tabs/documents in the DocumentManager, how would I programatically select one of the tabs?

I would have thought:
this.radDock1.DocumentManager.ActiveDocument = radDock1.DockWindows[1];
would be the way to go, but that property is read only.

I can't find anything in the documentation for this and boy, I wish you guys would comment all the methods and prcedures in the radDock library, so intellisense would give me a clue!

Thanks for the help,

Richard.

1 Answer, 1 is accepted

Sort by
0
rjmorton
Top achievements
Rank 1
answered on 24 Feb 2011, 10:13 PM
Okay, as is always the case, 5 minutes after posting the question, I found the answer!

Here's how to do it, just in case anyone else is stuck like I was:
DockWindow[] docWindows = this.radDock1.DockWindows.GetWindows(DockState.TabbedDocument);
this.radDock1.ActiveWindow = docWindows[0];

I don't know if there's an easier way to do it (seems a little convoluted to me)?

I found this answer in the samples app (Dock > Tabbed Document)
Tags
Dock
Asked by
rjmorton
Top achievements
Rank 1
Answers by
rjmorton
Top achievements
Rank 1
Share this question
or