Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why does label and textbox not show in dockablewindow form

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
kbo
Advocate
364 Views, 2 Replies

Why does label and textbox not show in dockablewindow form

Hello,

 

I try to create a dockable windows form with a label and a textbox, the dockable window shows fine but the label and the textbox on the form loadet i in the dockable window does not show? what am i doing wrong. i Attached the hole program in a zip file. Please help

 

This program is an inv 2014 addin.

 

regards kent boettger

2 REPLIES 2
Message 2 of 3
kbo
Advocate
in reply to: kbo

Okay Forget it found the solution on the net otherwhere,

 

if somone is interested here it is.

 

        Public Shared Sub CreateDockableWindow(app As Inventor.Application)

            Dim uiMan As UserInterfaceManager = app.UserInterfaceManager

            Dim dockableWin As Inventor.DockableWindow = uiMan.DockableWindows.Add(Guid.NewGuid().ToString(), "KB_DockableWindow1", "KB - DockableWindow #1")

            dockableWin.AddChild(CreateChildDialog())

            dockableWin.DisabledDockingStates = Inventor.DockingStateEnum.kDockTop + Inventor.DockingStateEnum.kDockBottom

            dockableWin.DockingState = DockingStateEnum.kDockLeft

            dockableWin.ShowVisibilityCheckBox = True

            dockableWin.ShowTitleBar = True

            dockableWin.SetMinimumSize(100, 100)

            dockableWin.Visible = True

        End Sub

        Public Shared Function CreateChildDialog() As Long

            Dim dc As New Form1()

            '   dc.Text = "Child Dialog"

            '   dc.HelpButton = InlineAssignHelper(dc.MinimizeBox, InlineAssignHelper(dc.MaximizeBox, False))
            '   dc.ShowIcon = InlineAssignHelper(dc.ShowInTaskbar, False)
            '    dc.TopMost = True

            '    dc.Height = 100
            '    dc.Width = 300
            '   dc.MinimumSize = New Size(dc.Width, dc.Height)

            ' Dim margin As Integer = 5
            'Dim size As Size = dc.ClientSize

            'Dim tb As New System.Windows.Forms.TextBox()
            '   tb.TextAlign = HorizontalAlignment.Right
            '    tb.Height = 20
            '  tb.Width = size.Width - 2 * margin
            '   tb.Location = New System.Drawing.Point(margin, margin)
            '   tb.Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
            '   dc.Controls.Add(tb)

            dc.Show()

            Return dc.Handle.ToInt64()

        End Function

 regards. Kent boettger

Message 3 of 3
GeorgK
in reply to: kbo

Hello Kent,

 

please could you provide a complete sample and attach the zip-file?

 

Thank you very much

 

Georg

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report