Color.SelectedFromDialog: No OK/Cancel

Mac: Mojave
Xojo: 2019 R3.1

The new color picker

Color.SelectedFromDialog has a third optional parameter: Show Alpha

It defaults to False. But if you assign the third parameter: True, it brings up a slider that gives you the option of specifying a transparency.

In my experience, if I do that, I do not get the OK or Cancel buttons that I expect (and which are present if the third parameter is False. Is that expected? And how do you Cancel?

In other tools/languages or via declares the Color Picker is live panel, as you adjust the color, the values are sent to your application and you should update your content as the color is being adjusted.

I’ve only seen this modal color picker in Xojo and Photoshop. I don’t think this will help you, but maybe it might spur something.

I no longer see the Ok/Cancel buttons at all, whether I have the Show Alpha as True, False or just not present. As noted in another post, if you leave the Color dialog open when you close the dialog that called it, when you close the color window it causes the main app to just die with no trail!

It looks like Catalina no longer show the Ok/Cancel buttons.

A version of the app I compiled last year does show the buttons, I think was compiled in 2019r1 or 2018r3 or thereabouts. ! So I suspect the framework is in play here as well.

Xojo 2018r4: macOS builds now use the 10.14 SDK, so yes, if your app was compiled with 2018r3 should use the older SDK and may make Catalina show the Ok/Cancel buttons.

If there’s interest in it (and only for macOS) I can create a color selector button that operates in the native platform way.

Hi Sam,

Cool, i am interested !

For my app I am working currently on an advanced Win / Mac color chooser. It uses MBS Plugins and Xojo components. If anyone is interested, I can share the code here.

Current state:

Very nice. I would love to see it. Thanks to Sam too.