I have troubles, and it may be because there is no validation button in the SelectColor window.
Also, note the SelectColor window width is extremely thin at first open; once I clicked on the RGB/TSL/etc. button, it enlarge itself; but no button to validate the selected color.
No crash, the change is not validated.
I wasted time yesterday with that, until I fired my other laptop with High Sierra and remove some other bugs (once there is a bug, I usually discover plenty… and in this case, I also discovers a bug in the my feature implementation (1) ).
Don’t use SelectColor on Big Sur. Modal color selection was deprecated but Apple a long time ago and they’ve finally done something that breaks it.
To get colors, please use the new DesktopColorPicker control which allows for asynchronous color selection on macOS and continues to be synchronous on Windows and Linux (although the events still fire for consistency).
Now, you are correct that there is no OK button. That’s how most color pickers work on macOS today. They’re this floating palette that just hangs around until the user closes it themselves.
You can help this situation by closing the color picker when the view closes ( in the close or cancel close event) by calling DesktopColorPicker.Close. Note that this is a shared method on the class and does not need to be called on an instance so it can be called from just about anywhere.
Sorry, I forgot my rule: check in the “OS provider” applications how things are done.
But now, the question is:
in Apple’s TextEdit, when you add colors to the user list (check the screen shot below), a focus ring (in this case: a selection ring) appears, not in RudolfJ project. (I suppose ot will be the same for my projects).
ARRRGGGGHHHH: at the time I wanted to take a screen shot, there was no more Focus ring. But:
In this screen shot, I populated the “user colors palette” (my name) at the windoid bottom’s, and selected (with a simple click) the Red color. That color appears in the larger square (bottom left) that is here to say “this is the selected color”.
Last bit of information:
In Apple’s TextEdit, there is a MenuItem (Cmd-Shift-C, as usual) that allow to show / hide the Colors windoid (named Couleurs in French).
The Color Picker stays connected to the Rectangle. If you close it and open another for the TextArea… the color change will no more affect the Rectangle.
the color picker kept focus
I added Window.show to access cmd / shift c to obtain
with my old imac 5K bigsur everything works
I cannot determine how it works for you on the M1
greetings Rudolf