Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowCloseButton

Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowCloseButton

Anonymous
Not applicable
2,102 Views
13 Replies
Message 1 of 14

Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowCloseButton

Anonymous
Not applicable
Does any one know why this doesn't actually show a close button on a palette set? Do I need to enable some other method or reference or something before I get an X button on my palette?
0 Likes
2,103 Views
13 Replies
Replies (13)
Message 2 of 14

Anonymous
Not applicable
I got an answer from Walmsley. Apparently it is required to mix in some arx code to actully get this to work. One more reason to stick with vba and let Gates keep his junk to himself
0 Likes
Message 3 of 14

Anonymous
Not applicable
What you were told is not true.

There's no need to 'mix some arx code' to get a close button to show on a pallete.

All of my palettes have close buttons on them.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com

wrote in message news:5908603@discussion.autodesk.com...
I got an answer from Walmsley. Apparently it is required to mix in some arx code to actully get this to work. One more reason to stick with vba and let Gates keep his junk to himself
0 Likes
Message 4 of 14

Anonymous
Not applicable
really? can you let me know why my buttons dont appear on the pallette? The only code I can fine is the showclosebutton that a stated above, but it doesn't seem to do anything. Do I need to add something else to make it active?
0 Likes
Message 5 of 14

Anonymous
Not applicable
Are you asking me to guess what your code does?

Please post the relevant parts and I'll have a look.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com

wrote in message news:5908912@discussion.autodesk.com...
really? can you let me know why my buttons dont appear on the pallette? The only code I can fine is the showclosebutton that a stated above, but it doesn't seem to do anything. Do I need to add something else to make it active?
0 Likes
Message 6 of 14

Anonymous
Not applicable
Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowCloseButton
also
Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowminimizeButton

these are in the initialize area of the code. Do you think something else in my code is swithching back off? If not known of the other code is relavant.
0 Likes
Message 7 of 14

Anonymous
Not applicable
Sorry, I'm not interested in playing peek-a-boo.

I said post the relevant parts of the code.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com

wrote in message news:5909089@discussion.autodesk.com...
Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowCloseButton
also
Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowminimizeButton

these are in the initialize area of the code. Do you think something else in my code is swithching back off? If not known of the other code is relavant.
0 Likes
Message 8 of 14

Anonymous
Not applicable
I'll see if I can post something, but the code actually reads from a database, so all it really says is is stuff like "mdi.asp.feild6 = db.parameter.height" there isn't a whole lot of code to see. I will try to put together a pallette with a little more meat to it with the same inailizer on on the interface. I will get that up next week sometime since I will be out of the office untill Wednesday. Thanks for the help though.
0 Likes
Message 9 of 14

Anonymous
Not applicable
You're misunderstanding what I mean by 'relevant'.

I don't want/need to see code that reads from a database,
only the code that creates and shows the PaletteSet.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com

wrote in message news:5909269@discussion.autodesk.com...
I'll see if I can post something, but the code actually reads from a database, so all it really says is is stuff like "mdi.asp.feild6 = db.parameter.height" there isn't a whole lot of code to see. I will try to put together a pallette with a little more meat to it with the same inailizer on on the interface. I will get that up next week sometime since I will be out of the office untill Wednesday. Thanks for the help though.
0 Likes
Message 10 of 14

Anonymous
Not applicable
Sorry Tony, the head programmer won't let me post any code for security reasons. So I guess we will have to figure this out ourselves. Thanks for trying to help us though.
0 Likes
Message 11 of 14

Anonymous
Not applicable
>> Sorry Tony, the head programmer won't let me post any code for security reasons. <<

LOL

There's no security issues with posting a couple of lines of code that creates a paletteset and sets its style.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
0 Likes
Message 12 of 14

Anonymous
Not applicable
Tony I got permission to post this:

Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
Try

If ps Is Nothing Then
Dim myForm As ModelessForm = New ModelessForm()
ps = New Autodesk.AutoCAD.Windows.PaletteSet("MYPALLETTE")
ps.Style = PaletteSetStyles.ShowTabForSingle
'Wouldn't this statement show the "X" on the Palette:
ps.Style = PaletteSetStyles.ShowCloseButton
ps.Style = PaletteSetStyles.ShowAutoHideButton

ps.MinimumSize = New System.Drawing.Size(300, 500)
ps.Opacity = 65
ps.Add("Search Catalog", myForm)

ps.Visible = True
ps.Dock = DockSides.Left
End If
Catch ex As System.Exception
ed.WriteMessage("Error Creating Palette: " + ex.Message)
End Try

I hope you can see something I cant.
0 Likes
Message 13 of 14

Anonymous
Not applicable
You probably shouln't let the head programmer see this thread.

PaletteSetStyles is a set of flags.

I'll have to assume that you're not familiar with flags and bitwise operatons or how to work with them.

The probelm you have is that you are assigning individual flags to the property, when you should be combining them, like this:

ps.Style = ps.Style Or PaletteSetStyles.ShowTabForSingle
ps.Style = ps.Style Or PaletteSetStyles.ShowCloseButton;
ps.Style = ps.Style Or PaletteSetStyles.ShowAutoHideButton;

The "Or" operator combines the existing flags set in the style property, with the one you pass as the operand.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com

wrote in message news:5914319@discussion.autodesk.com...
Tony I got permission to post this:

Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
Try

If ps Is Nothing Then
Dim myForm As ModelessForm = New ModelessForm()
ps = New Autodesk.AutoCAD.Windows.PaletteSet("MYPALLETTE")
ps.Style = PaletteSetStyles.ShowTabForSingle
'Wouldn't this statement show the "X" on the Palette:
ps.Style = PaletteSetStyles.ShowCloseButton
ps.Style = PaletteSetStyles.ShowAutoHideButton

ps.MinimumSize = New System.Drawing.Size(300, 500)
ps.Opacity = 65
ps.Add("Search Catalog", myForm)

ps.Visible = True
ps.Dock = DockSides.Left
End If
Catch ex As System.Exception
ed.WriteMessage("Error Creating Palette: " + ex.Message)
End Try

I hope you can see something I cant.
0 Likes
Message 14 of 14

Anonymous
Not applicable
Tony,
That worked just great. We can now hide our pallettes.
Had to modify it slightly to get it to re-appear after the command call. But you solved a big problem for us. Thanks a million.
0 Likes