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
Solved! Go to Solution.
Solved by kbo. Go to Solution.
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