Would be something like this:
Dim uiTab1 As New userControlForTab1
Dim uiTab2 As New userControlForTab1
Dim uiTab3 As New userControlForTab1
Dim ps As Autodesk.AutoCAD.Windows.PaletteSet
ps = New Autodesk.AutoCAD.Windows.PaletteSet("MyPaletteSetName", New
System.Guid("{F8000005-B5F0-4996-8007-191F2A51D133}"))
ps.Dock = Autodesk.AutoCAD.Windows.DockSides.None
ps.Enabled = Autodesk.AutoCAD.Windows.DockSides.Left
ps.Add("Tab 1", uiTab1)
ps.Add("Tab 2", uiTab2)
ps.Add("Tab 3", uiTab3)
ps.Style = 10 ' show autohide and close buttons
ps.MinimumSize = New System.Drawing.Size(200, 300)
ps.Visible = True
ps.Activate(0) ' index of the default tab
I have suffered some problems with PaletteSet.style, PaletteSet.Dock and
PaletteSet.DockEnabled properties that I haven't been able to solve - for
example PaletteSet.Dock doesn't seem to have any effect. Because of that,
the first time the palette is lauched, it is always docked to the left no
matter what you set for ps.Dock. If you undock the Palette and close Acad,
the next time the palette is where you left it. After that it works fine
(i.e. docks as defined in ps.Enabled). For example if you want to enable
both right and left docking you can set ps.Enabled = DockSides.Left +
DockSides.Right.
/ Tomi
kirjoitti viestissä:5038136@discussion.autodesk.com...
Hi All,
Has anyone tried to create a muti-tabs palette in vb.net? Thanks.
-Rick-