0

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.

1
  • There are relationships between all the windows in an application (a combination of owner ship and parent hood). If you get the Spy++ tool (which I think is now get-table as a C++ add on to Visual Studio), you can manually inspection these relationships. Once you manually figure out the relationships in you app, you can the traverse the window graph
    – Flydog57
    Commented Nov 29 at 17:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.