How to grey out an option until condition is met

I have these two widgets:
colour (= choice;)
customColor (= the Colour selection)

I would like customColor (the color selection) to be active only when colour is option 4.

I thought something like this might do it, but doesn’t

dialog.set_sensitive_if_in(“customColour”, config, “colour”, Gimp.ValueArray.new_from_values([4]), False)

So, what’s the proper way to do this?

If colour is a GimpChoice, then it should be a string, not an int. You should test with Gimp.ValueArray.new_from_values(["whatever-is-value-4"]).

Thank you very much.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.