View Full Version : Check for colorPickerDlg open/closed

07 July 2011, 10:00 PM

I've been looking around for a way to check if the colorPickerDlg is open or closed from within my scripts. What I want to do is to open up a hue wheel (was planing on spawning a rollout with a imgTag, but I am open for other ideas) when someone presses a colorPicker in my script and the colorPickerDlg opens, and then remove it again when it closes.

07 July 2011, 06:51 AM
Not sure I understand, you want to open a dialog instead of the max colorpicker, or alongside with it?

07 July 2011, 04:27 PM
Alongside. The plan is to create and destroy the dialog along with the colorPickerDlg that opens when you change color on the colorpicker.

07 July 2011, 06:18 PM
The colorpicker has only one handle - "on changed" (on <colorpicker> changed <arg> do <expr>) and it is executed at the end when the color picker dialog is closed, but you can launch that dialog with colorPickerDlg from button or imgTag (if you like to mimic the colorpicker ui), and as i remember, the max will wait the user to close the dialog before continue with reading/evaluating next code line.

pseudo code: on myBtn pressed do
CreateDialog myDlg
ursClr = colorPickerDlg ...
DestroyDialog myDlg

07 July 2011, 05:08 PM
Thanks, I'll try to get it working with your technique :)

CGTalk Moderation
07 July 2011, 05:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.