• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: setEditable for NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: setEditable for NSTextField
      • From: Chuck Soper <email@hidden>
  • Prev by Date: Re: Newbie question: how to release an object that has been autoreleased
  • Next by Date: Re: Newbie question: how to release an object that has been autoreleased
  • Previous by thread: setEditable for NSTextField
  • Next by thread: Re: setEditable for NSTextField
  • Index(es):
    • Date
    • Thread