@Rudolf J Hello Greg
in API2, the color picker is Color.SelectedFromDialog, which
is connected to Textarea.SelTextColor as long as there is active
Is there a xojo of a system property with which color can be read?
my little test program to download
The problem is probably that on modern versions of macOS, the color picker is asynchronous and we shoe-horn it into working modally. That's what gives you the ability to do have code execution wait for the user to pick a color.
Var myColor as Color = &cFF0000
If Color.SelectedFromDialog(myColor, "Pick a color, any color") Then
MsgBox("You picked my favorite color!"
Now, one thing that you can do, is to make sure that the control that you are picking from has the focus. To do that with the canvases, make sure you turn on the "Allow Focus" option in the inspector and then at the top of the MouseDown event, add the following code: