CocoaMix86
CocoaMix86

Reputation: 105

How to enumerate all Documents/tabs of a DockPanel?

This is using DockPanelSuite in winforms.

I have a DockPanel dockMain with many tabs on it, including FloatWindows. I have a function that is supposed to check if a tab exists with a certain name, and if found, Activate it.

private void FindTab(string tabname)
{
   if (dockMain.Documents.Where(x => x.DockHandler.TabText == tabname)).Any())
      dockMain.Documents.Where(x => x.DockHandler.TabText == tabname)).First().DockHandler.Activate();
}

However, dockMain.Documents seems to only find non-float documents so it never finds a tab that is floating even if the name does exist.

I checked over all the methods of dockMain.FloatWindows too but there doesn't seem to be a simple way to get the tabs open in each of them.

Upvotes: 0

Views: 20

Answers (0)

Related Questions