Re: Changing a custom field editor's position
Re: Changing a custom field editor's position
- Subject: Re: Changing a custom field editor's position
- From: Corbin Dunn <email@hidden>
- Date: Mon, 16 Mar 2009 14:44:48 -0700
On Mar 15, 2009, at 9:45 AM, Ulai Beekam wrote:
Hi,
Let's say I want to have the field editor for a table view appear 2
pixel below where it usually is, i.e. shifted 2 pixels down.
How can I do this?
Consider the following hypothetical situation: If I subclass
NSTextView and override the drawRect method like this,
- (void)drawRect:(NSRect)rect
{
NSRect frame = [self frame];
frame.origin.x += 5.0;
[self setFrame:frame];
[super drawRect:rect];
}
Moving stuff in drawRect is bad, for various reasons. You can move it
in -viewWillDraw.
Also, if that doesn't work the way you want, try repositioning the
fieldeditor after calling super from -editColumn:...
--corbin
_______________________________________________
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