[Closed] Close event handler on native window
Ok, I see what you mean. Using do not MatEditor.isOpen() for isChecked handler sure will work for macrobuttons. Topic starter asked exactly that.
most max dialogs send an “update toolbar buttons” message on open/close. so every macro button catches it with its own handlers.
but there may be some dialogs which don’t send. these dialogs need special attention.
do you know what kind of notification code could it be?
I guess it is possible to catch it with dotNetObject "managedservices.maxnotificationlistener" <code>
@denisT
man i think you’re a genius
on ischecked do MatEditor.isOpen() worked very well
now the button gets checked when the dialog is opened and gets unchecked instantly with some dialogs and others after a couple of clicks here and there
thanks alot @Serejah for pointing out multiple ways i was not aware of them before
thanks alot guys
this notification should be forced by third party tools, and implemented by the system for its own dialogs that have action buttons on the main or other built-in toolbars:
see SetMacroButtonStates
Haven’t seen this method before, thanks!
I checked the sources for these methods in core.dll and looks like there’s nothing to subscribe and listen to, so it is not a notification but a way for plugin to invalidate and redraw button rect.
Recent Topics
-
Need help with script to automate certain things
By siddhartha 6 days ago
-
By Dave 3 months ago
-
By MZ1 1 year ago
-
By brianstorm 1 year ago
-
By MZ1 1 year ago
-
Support class with multiple name (C#,SDK)
By MZ1 1 year ago
-
How to sort subarrays for Mat ID swapping
By brianstorm 1 year ago