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

  1. last week

    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.

  2. 5 days ago

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

  3. 4 days ago

    Craig H

    Dec 6 Black Hills, SD, USA
    Edited 4 days ago

    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).

  4. Greg O

    Dec 6 Xojo Inc scout.galaxy.barn

    @Craig H 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).

    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).

  5. 2 days ago
    Edited 2 days ago

    Hallo Greg
    in API2, der Farbwähler 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
    -image-

  6. 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

  7. Greg O

    Dec 8 Xojo Inc scout.galaxy.barn
    Edited 2 days ago

    @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!"
    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

or Sign Up to reply!