• 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: NSTextField, drawing the text offset to the right in the field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField, drawing the text offset to the right in the field


  • Subject: Re: NSTextField, drawing the text offset to the right in the field
  • From: jon <email@hidden>
  • Date: Tue, 29 Sep 2009 19:25:05 -0600

hmmm,  well i'm trying hard to do it...    here is what i've done...

in a header:

IBOutlet ImageTextField *addressBar;

i've created this pointer to this instance...

and then in the awakefromNib method,  i have this...

[ImageTextField setCellClass:[ImageTextFieldCell class]];

this set's the class so it's cell is "correct"... for the class... but....

but maybe this is too late for the instance addressBar. which was set in the header and IB???

I don't know how to check this instance to see if it is using the custom cell, and i don't know how to set the instance specifically... (if this class method didn't do it)?

Jon.







On Sep 29, 2009, at 7:06 PM, Matt Neuburg wrote:

On or about 9/29/09 4:43 PM, thus spake "jon" <email@hidden>:

is properly using my custom textfield, but the custom textfield doesn't
appear to be using the custom cell

Then you have to *make* the custom textfield use the custom cell. :) Use
whips and chains if necessary. Actually, I think what I said before may
cover this sufficiently:


On Sep 28, 2009, at 9:30 PM, Matt Neuburg wrote:
What I do is have the textfield replace its cell by a custom cell that
implements drawInteriorWithFrame, such as to inset its frame rect as it
calls super. m.

As the first part states, an instance of your cell class must *be* this text
field instance's cell. You have to make that happen... m.


--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTextField, drawing the text offset to the right in the field
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: NSTextField, drawing the text offset to the right in the field (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Fast transition between two graphics
  • Next by Date: Re: NSTextField, drawing the text offset to the right in the field
  • Previous by thread: Re: NSTextField, drawing the text offset to the right in the field
  • Next by thread: Re: NSTextField, drawing the text offset to the right in the field
  • Index(es):
    • Date
    • Thread