PDA

View Full Version : Check for colorPickerDlg open/closed


PrefeX
07-28-2011, 11:00 PM
Hi.

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.

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

PrefeX
07-29-2011, 05: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.

Panayot
07-29-2011, 07: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
)

PrefeX
07-31-2011, 06:08 PM
Thanks, I'll try to get it working with your technique :)

CGTalk Moderation
07-31-2011, 06: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.