Color.SelectedFromDialog (c, "Select a Color") in API2

Who has the new one
Color.SelectedFromDialog (c, “Select a Color”) in API2
redesigned? (bad as OK button is gone)
The handling with close the color window in small
closebutton is magelike - it also needs a little one
delay until the color is implemented.
I have to design my own color selector now.

I have a new insight
Color.SelectedFromDialog (c, “Select a Color”)
has a permanent connection to Textarea.SelTextColor
until the dialog box closes again.

Rudolf, I 'd like to help but I do not know what you are asking.

I have found that the color picker seems to be working as it did before in older versions. In 19R2.1 for Mac desktop, both “Cancel” and “OK” buttons are present and seem to work.

The color picker behaves as a “Modal Window”, that is, the user must either hit the cancel or the ok buttons in order to return to the parent program. On Mac, the color picker shows the three small dots at the top left for “close”, “minimize” and “maximize”, but only the “maximize” button is made active (colored green).

[quote=466265:@Craig Hyde]Rudolf, I 'd like to help but I do not know what you are asking.

I have found that the color picker seems to be working as it did before in older versions. In 19R2.1 for Mac desktop, both “Cancel” and “OK” buttons are present and seem to work.

The color picker behaves as a “Modal Window”, that is, the user must either hit the cancel or the ok buttons in order to return to the parent program. On Mac, the color picker shows the three small dots at the top left for “close”, “minimize” and “maximize”, but only the “maximize” button is made active (colored green).[/quote]
The behavior is different on newer versions of macOS because the long-deprecated version we’d been using finally stopped working in 10.15. This newer version also gives us a way to expose the more modern features associated with recent versions of macOS (like transparency).

Hallo Greg
in API2, der Farbwhler ist Color.SelectedFromDialog, der
mit Textarea.SelTextColor verbunden ist, solange es aktive gibt

gibt es ein xojo eine systemeigenschaft mit der die farbe ausgelesen werden kann?

mein kleines testprogramm zum download

https://www.dropbox.com/s/aga2mihbd068wgp/color-select-API2.xojo_binary_project?dl=1

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

[quote=466518:@Rudolf Jackel]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[/quote]

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!" End If

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:

Me.SetFocus