TextArea and SelectColor

What the heck…?

On a mousedown event for a TextArea I call SelectColor in order to change the color of the selected text.

But the color in the textarea changes IN REALTIME as I manipulate the Color Dialog… so there is no chance to “cancel” as the color has already been changed?

How can I disconnect that behaviour? and change it only if the user did NOT cancel?

From a post by Sam in 2014

in the TextArea OPEN

#If TargetCocoa Then
  Declare Sub mysetUsesFontPanel Lib "Cocoa" selector "setUsesFontPanel:" ( obj As Integer, flag As Boolean )
  Declare Function documentView Lib "Cocoa" selector "documentView" ( obj As Integer ) As Integer
  mysetUsesFontPanel( documentView( Me.Handle ), False )
#EndIf