Odd. It is becoming customary to dynamically adjust which dialog box dismissal button (OK/Cancel for Windows or Cancel/OK for OS X viewing them left to right on a dialog canvas). While maintaining focus on another UI control, text box, I want to disable the OK button if the text field changes to a null field and then re-enable once the text field as text exists. Consequently, I want to make the Cancel or OK the default so that the user can press the Enter key to accept the text input (or to cancel if there is no text entry).
Pretty simple in concept and streamlines the UI possibly removing a tab or additional mouse click.
I’ve “wired” the text box control’s TextChange event handler to check and set the OK/Cancel buttons accordingly. Windows it works fine, just as expected. However, in OS X when the OK becomes the default instead of the original Cancel being the default, the Cancel button goes completely white. That might be because in OS X the default is white text on a blue button and I’m wondering if when I set the Cancel button’s Default property to False and OK property to True that the Cancel’s button text is still white?
Have any of you seen this before? I tried to find a good example in the latest Xojo 2014 R3.1 examples and couldn’t find one.