How to Add Multiple Tabs to a Dockable Window

How to Add Multiple Tabs to a Dockable Window

Anonymous
Not applicable
1,471 Views
19 Replies
Message 1 of 20

How to Add Multiple Tabs to a Dockable Window

Anonymous
Not applicable

More detail in the picture below.

 

I am wondering if it is possible to attach multiple tabs to a single Dockable Window. For my use, I am getting multiple txt files which I would like to have separate, however having a separate window for each txt file will quickly clutter the screen. Is it possible to group all of them into one?

 

 

 

(In the picture below, I am essentially looking to create "tab_2", "tab_3", etc.  all within the same Dockable Window)

 

multiple_tabs.png

1,472 Views
19 Replies
Replies (19)
Message 2 of 20

bradeneuropeArthur
Mentor
Mentor

you can create a dockable window for each of them.

1 for the one

1 for the other.

 

regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 3 of 20

bradeneuropeArthur
Mentor
Mentor

Or you can add a user control with tabs to the Dockable window of course.

 

Regrads

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 4 of 20

Anonymous
Not applicable

Of course, but this doesn't solve my problem. I want to avoid clutter, as I stated in the original post.

 

Say I have just 4 windows:

 

multiple_tabs_2.png

 

Now what happens if I have more? The part will barely be seen. I would like to group them into ONE dockable window, as stated.

To answer your post below, I want to know if this is possible within the Inventor API and not Win Forms, for cleanliness. The Inventor window already looks like it has space for more tabs so I would like to keep the interaction up there, and not create essentially 2 headers - one from Inventor (the "1", "2", etc above) and one from Win Forms (more tabs). 
If that's the route I have to go then I will, but for now I would like to know if it's possible to group them within Inventor.

0 Likes
Message 5 of 20

Anonymous
Not applicable

@bradeneuropeArthur 

 

Take a look at the picture below. I see it is possible with the mouse to accomplish this. So I am wondering if I can do this with code.

multiple_tabs_3.png

0 Likes
Message 6 of 20

bradeneuropeArthur
Mentor
Mentor
  1. For inventor you can only add one control to a dockable window.

The picture shows separate dockable windows but stacked...

 

This is possible of course!

 

Regards 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 7 of 20

Anonymous
Not applicable

Oh ok! I read that, but I originally took it to mean one control per tab - (this is not very clear: for example, in the picture above, I have one textbox per dockable window, so I took it to mean I cannot have two textboxes within that same window).

 

So is it possible to stack those separate dockable windows through the API?

0 Likes
Message 8 of 20

bradeneuropeArthur
Mentor
Mentor

You can have more then one textboxes in a dockable window, sure.

You can only have on Control in the Dockable window.

 

Example:

 

Add one User-control/or Win-Form to the Dockable window.

And add as many textboxes as you need.

As already noticed earlier, you can also add a tab for each Textbox as you may prefer.

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 9 of 20

Dev_rim
Advocate
Advocate

Hi Philip,

we add tabs on dockable windows with DockableWindow.AddChild method.  I tried a few moths ago add more then one User Control in single dockable window. But we cant add more then one child for a dockable window. And Inventor API help says,

"Method that adds a dialog or a control to the dockable window. Currently, you can only add a single child to a dockable window. So this method returns a failure if the dockable window already has a child. It is the responsibility of the client to destroy the dialog/control as and when appropriate."
So I think that's the reason why you cant do that...

Regards.

If my answer is solved your problem, please mark it as Solution

Freundliche Grüße / Kind Regards
Message 10 of 20

bradeneuropeArthur
Mentor
Mentor

Hi,

 

The only option is to add Tabs to your User Control.

 

Tabss.JPG

 

And then add your textboxes to these tabs.......

 

Regards,

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 11 of 20

Dev_rim
Advocate
Advocate

You're right. Also we can close title bar of dockable window. 

oDockableWindow.ShowTitleBar = False

For better view...

 

Regards,

If my answer is solved your problem, please mark it as Solution

Freundliche Grüße / Kind Regards
Message 12 of 20

Anonymous
Not applicable

Thank you for all the replies.

 

Yes, I recall reading this in the API, only one child per dockable window. However now, strangely, since I have grouped the tabs together by mouse (as in my last picture), now every time I run the program, all the output is grouped into a single dockable window. Maybe it goes with the last used configuration? I'm not sure. But now, by accident, I am getting the desired behaviour, at least on my local machine.

0 Likes
Message 13 of 20

bradeneuropeArthur
Mentor
Mentor

Hi,

 

What you see now is multiple Dockable Windows.

But these Dockable Windows are stacked.

 

You are mis-interpreting the situation on the screen, I think

 

Regards,

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 14 of 20

Anonymous
Not applicable

I see, I am just using the wrong terminology. Thanks for clearing that up.

Therefore, rephrased: I actually don't care about having a single dockable window, but having each window I create stacked together. Is it possible to do this consistently through Inventor? 

 

The program doesn't seem to care now whether I use kDockLastKnown or kDockLeft as the docking state - in each case they are grouped together. I guess now I am wondering how to make it so that they are un-grouped; I just want to know how to control the stacking myself without using the mouse.

0 Likes
Message 15 of 20

bradeneuropeArthur
Mentor
Mentor

Hi,

 

Do I understand correct:

You need a code that stacks and a code that un-stacks the Dockable Windows?

Creating the Dockable windows is not the issue for you?

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 16 of 20

Anonymous
Not applicable

@bradeneuropeArthur 

 

Yes! This exactly.

0 Likes
Message 17 of 20

Anonymous
Not applicable

(bump for visibility)

0 Likes
Message 18 of 20

bradeneuropeArthur
Mentor
Mentor

Maybe this:

 

 For Each d As Inventor.DockableWindow In m_inventorApplication.ActiveView
                d.Width = 0
 Next

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 19 of 20

julian_sol
Contributor
Contributor

Does anyone now if in Inventor 2022 you can stack dockablewindows (by code) already?

0 Likes
Message 20 of 20

g.georgiades
Advocate
Advocate

Hi,

 

The answer is maybe yes, but it can be extremely buggy/inconsistent because it was implemented poorly... You may be able to achieve what you want, but it may take a lot of trial and error.

 

See GetDockingState/SetDockingState of the DockableWindow object.

https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-BBE4333E-494C-463E-BD49-DD7298C4834D

 

Here is an example picture from my testing last year where it was creating ghost windows. Moving viewframe tabs around has similar issues.

ggeorgiades_0-1648477298651.png