Create docking window / browser bar

Create docking window / browser bar

NachoShaw
Advisor Advisor
2,249 Views
1 Reply
Message 1 of 2

Create docking window / browser bar

NachoShaw
Advisor
Advisor
hi

I would like to place some functions on a docked form just like the browser bar. There is a sample in the api in vba which creates the bar but i csnt see how to add controls. In visual studio, i can create everything i would like on a control form. How can i load that onto the browser bar created?

Is this even the right method?

Thanks

Nigel

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
2,250 Views
1 Reply
Reply (1)
Message 2 of 2

manuel.lanthaler
Enthusiast
Enthusiast

Hi,

 

To create a dockableWindow you can use the example from the Inventor API:

 Dim oUserInterfaceMgr As UserInterfaceManager
    Set oUserInterfaceMgr = ThisApplication.UserInterfaceManager

    ' Create a new dockable window
    Dim oWindow As DockableWindow
    Set oWindow = oUserInterfaceMgr.DockableWindows.Add("SampleClientId", "TestWindowInternalName", "Test Window")

 

After creating the DockableWindow you can then add WPF controls or WinForm dialog as a child by using the WindowHandle:

 

'Create the new UserControl
Dim MyForm As New Form1()

' Add the dialog as a child to the dockable window
oWindow.AddChild(MyForm.Handle)

 

if you are trying to host a WPF control in a dockable Window then you have to create an ElementHost containing the WPF UserControl and assign that elementHost as a child to your dockable Window.

 

Here is an example of how to embedd a WPF user control in a Dockable Window:

http://adndevblog.typepad.com/manufacturing/2012/06/embedding-a-wpf-user-control-in-a-dockablewindow...

 

A specific template to create a dockable  in C# can be found here:

http://adndevblog.typepad.com/manufacturing/2013/02/design-patterns-applied-to-the-inventor-api.html

 

 

 

hope it helps

 

Manuel

coolOrange
www.coolOrange.com
––––––––––––––––––
Please mark this response as "Accept as Solution" if it answers your question.
If you have found any post to be helpful, even if it's not a direct solution, then please provide that author kudos.


0 Likes