New Horizonatl/Vertical Tab Group

DockableWindow/TabStripPanel for Windows Forms Forum

Posted 20 years ago by Bernd
Avatar
How do I implement inserting a New Horizontal/Vertical Tab Group
and move the current ActiveDocument to this new Document Container?

I mean doing it by code (not at runtime by using the built-in default context menu).

Thanks
Bernhard

[ 08-19-2004: Message edited by: Bernd ]

Comments (6)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Call the DWManager.MoveWindowToNewDocumentContainer method.


Actipro Software Support

Posted 20 years ago by Bernd
Avatar
Thanks. I just wanted to post that I had found that method in meantime.

Bernhard
Posted 20 years ago by Bernd
Avatar
Just one question about the parameter "index".
I have not figured out what the right value is here.

That seems to work in case of new horizontal tab group:

this.DWManager.MoveWindowToNewDocumentContainer(System.Windows.Forms.Orientation.Horizontal,
this.DWManager.ActiveDocumentContainer.SelectedIndex,
this.DWManager.ActiveDocument);


but this does not work in every case for new vertical tab group:
this.DWManager.MoveWindowToNewDocumentContainer(
System.Windows.Forms.Orientation.Vertical,
this.DWManager.ActiveDocumentContainer.SelectedIndex,
this.DWManager.ActiveDocument);


How is the hirarchy exactly implemneted in case of
horizontal and vertical splits and how do I get the
right next "index"?

Bernhard
Posted 20 years ago by Bernd
Avatar
I think I should use
index="this.DWManager.Workspace.DocumentContainers.Count"
?

There is nothing in the documentation about this index parameter.
Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I believe the docs say "The index of where to insert the new document container." So you are correct in using the Count of document containers.


Actipro Software Support

Posted 20 years ago by Bernd
Avatar
I got it. To get the identical behaviour like in
Visual Studio the index should be set to

index= this.DWManager.Workspace.DocumentContainers.IndexOf(this.DWManager.ActiveDocumentContainer)+1


so inserting a new Horizontal Tab Group would be:

this.DWManager.MoveWindowToNewDocumentContainer(System.Windows.Forms.Orientation.Horizontal,
this.DWManager.Workspace.DocumentContainers.IndexOf(this.DWManager.ActiveDocumentContainer)+1,
this.DWManager.ActiveDocument);
The latest build of this product (v2.0.0208) was released 19 years ago, which was after the last post in this thread.