Re: setEditable for NSTextField
Re: setEditable for NSTextField
- Subject: Re: setEditable for NSTextField
- From: Matt Neuburg <email@hidden>
- Date: Wed, 22 Sep 2004 11:31:00 -0700
On Tue, 21 Sep 2004 12:01:47 -0700, Chuck Soper <email@hidden> said:
>I am trying to programmatically turn on and off editing for an
>NSTextField. Calling setEditable: does turn on and off editing
>properly. But, when the field is not editable I also need to prevent
>the white background from drawing and having the text being initially
>selected.
First, set the window's firstResponder to nil so that no selection is
happening and the field editor is not in your way. Then:
[f setBezeled: yn];
[f setEditable: yn];
[f setDrawsBackground: yn];
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden