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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to