.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pallet Closed Event

6 REPLIES 6
Reply
Message 1 of 7
foruma000256
473 Views, 6 Replies

Pallet Closed Event

Am I missing something or is there not a PaletteClosed event? Is there any other method I can use to detect the moment in time the user hits the close button on a Palette?

Any advice/help/comments are will be appreciated.

Thanks,

jvj
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: foruma000256

StateChanged Event ?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

wrote in message news:5984688@discussion.autodesk.com...
Am I missing something or is there not a PaletteClosed event? Is there any other method I can use to detect the moment in time the user hits the close button on a Palette?

Any advice/help/comments are will be appreciated.

Thanks,

jvj
Message 3 of 7
foruma000256
in reply to: foruma000256

About that:

State Changed fires off anytime you dock or undock, as well as when you close the palette. Like so...
Dock (state hide, state unhide) fires 2 times
Undock (state hide, state unhide) fires 2 times
close (state hide) fires once

Other than those states (e, event args variable) there is no difference between the event arguments (sender or event args) that tell me it has been closed for good.

Why do I care you ask? Because when the user closes the form, I want to unload the entire program (remove all the event handlers for good, remove the data from memory etc.) If the user docs and undocs, I don't want to be removing all that stuff, because it takes some time to reload it (especially with large projects full of data).

So anywhere else I can look?

Thanks

jvj
Message 4 of 7
Anonymous
in reply to: foruma000256

Sorry, I don't follow you.

If you get the StateChanged event when the user closes the paletteset, then that's telling you it was closed.

You have to look at the event arguments to tell what state changed.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

wrote in message news:5985112@discussion.autodesk.com...
About that:

State Changed fires off anytime you dock or undock, as well as when you close the palette. Like so...
Dock (state hide, state unhide) fires 2 times
Undock (state hide, state unhide) fires 2 times
close (state hide) fires once

Other than those states (e, event args variable) there is no difference between the event arguments (sender or event args) that tell me it has been closed for good.

Why do I care you ask? Because when the user closes the form, I want to unload the entire program (remove all the event handlers for good, remove the data from memory etc.) If the user docs and undocs, I don't want to be removing all that stuff, because it takes some time to reload it (especially with large projects full of data).

So anywhere else I can look?

Thanks

jvj
Message 5 of 7
foruma000256
in reply to: foruma000256

I am only seeing properties in these events that tell me hide or unhide, nothing that indicates it was 'closed'. What do you see that tells you it was closed.

I get the StateChanged event many times as stated above. When it is docked, undocked, opened and closed, but nothing I can see tells me its off for good (Closed).

Thanks,

jvj
Message 6 of 7
Anonymous
in reply to: foruma000256

There is no such thing as "closed".

When the user clicks the X button on the PaletteSet, it is only hidden.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

wrote in message news:5986307@discussion.autodesk.com...
I am only seeing properties in these events that tell me hide or unhide, nothing that indicates it was 'closed'. What do you see that tells you it was closed.

I get the StateChanged event many times as stated above. When it is docked, undocked, opened and closed, but nothing I can see tells me its off for good (Closed).

Thanks,

jvj
Message 7 of 7
foruma000256
in reply to: foruma000256

I guess that means I need to create my own 'close' button then...

Thanks,

jvj

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost