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

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


  • Subject: NSTextField, drawing the text offset to the right in the field
  • From: jon <email@hidden>
  • Date: Mon, 28 Sep 2009 19:37:00 -0600

i've got a textfield defined...

	IBOutlet NSTextField *addressBar;

but i don't want to draw the text that is in the field right up against the left boarder of the bounding box of this defined field in IB,

I want to start the text like 20 pixels to the right of the left boarder and still have the nicely defined frame of the field in it's original place...

so far i've tried various methods,   one of them is below

	NSRect newFrame = [addressBar bounds];

	newFrame.size.width -= 20;
	newFrame.origin.x += 20;
	[addressBar displayRect:newFrame];

but haven't had any success, I'm sure someone here knows exactly what i'm trying to do and knows a quick way to do it..

i've also tried this: thinking i could get a textview back into a textfield... or somehow use a textcontainer on NSTextField... with no success...

	[addressBar setTextContainerInset:theInset];


thanks, Jon.


_______________________________________________

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


  • Prev by Date: Re: How to tell if NSArrayController has a selected CoreData instance?
  • Next by Date: Re: NSView clicking through to superview
  • Previous by thread: Re: Strange Core Data save behaviour ("required relationship nil"... when it is set the line before saving)
  • Next by thread: Crash in +[NSMethodSignature signatureWithObjCTypes:]
  • Index(es):
    • Date
    • Thread