.NET

Reply
Active Contributor
ricks2025
Posts: 26
Registered: ‎09-27-2005
Message 1 of 4 (119 Views)

Muti Tabs Palette

119 Views, 3 Replies
12-14-2005 12:22 PM
Hi All,

Has anyone tried to create a muti-tabs palette in vb.net? Thanks.

-Rick-
*Tomi
Message 2 of 4 (118 Views)

Re: Muti Tabs Palette

12-15-2005 02:07 AM in reply to: ricks2025
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-
Active Contributor
ricks2025
Posts: 26
Registered: ‎09-27-2005
Message 3 of 4 (118 Views)

Re: Muti Tabs Palette

12-15-2005 04:16 AM in reply to: ricks2025
Thanks Tomi! I will give it a try today.
*Fred Chateau
Message 4 of 4 (119 Views)

Re: Muti Tabs Palette

01-18-2006 06:24 PM in reply to: ricks2025
"Tomi" wrote ...

> 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.

This is just a guess but it sounds like it's not enough to just set
ps.Enabled. AutoCAD is storing positioning values somewhere and it may be
that they need to be initialized or maybe changed from a set of the docking
position values.

--
Regards,

Fred Chateau
fchateauAtComcastDotNet
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.