NSTextField, drawing the text offset to the right in the field
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