Hello,

I have a hard time achieving what the message title says.
Depending on user settings I want a text field to be either editable or 
non-editable.

I’ve tried this:

if makeEditable
        {               myTextField.isEditable = false
                        myTextField.drawsBackground = false }
else
        {               myTextField.isEditable = true
                        myTextField.drawsBackground = true }

Setting the editable property has the desired effect, but setting 
drawsBackground has no effect.
Also I need to move the focus to another control (if myTextField has focus) or 
else the insertion point indicator keeps blinking.
I’ve tried this:

                        if  myTextField.window!.firstResponder === myTextField
                                {
                                myTextField.window!.selectPreviousKeyView(nil)
                                }

but no cigar. firstResponder always is some button even when I see the 
insertion point indicator blinking.
Can some please shed some light on this?

TIA

Jan E.

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to