I have found a solution. I have overrided the method selectWithFrame:(NSRect)aRect inView:.... in my NSTextCell subclass. Here I modify the frame of the field editor It works. Thanks anyway.
-- Leonardo Da: Patrick Mau <[email protected]> Data: Sun, 28 Nov 2010 02:35:05 +0100 A: "gMail.com" <[email protected]> Cc: <[email protected]> Oggetto: Re: OutlineView with big text editor On 27.11.2010, at 15:43, gMail.com <http://gMail.com> wrote: > Hi, I have set a custom cell showing icon + text on my outlineView column. > It works well, but whenever I double click on the row to edit the text, I > get a text field editor bigger than the cell itself and covering the left > icon. How can I make this text field editor fit the cell bounds and not > covering the left icon? Hi Leo Your NSCell implementation should implement something like the following. In 'editWithFrame:...' you have to account for your image size and adjust the cell frame before calling super. (Copied from a custom cell code, but typed in mail to give you the idea) - (void)editWithFrame:(NSRect)r inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)theEvent { // Adjust the cell frame to not cover the image r.origin.x += imageWidth; r.size.width -= imageWidth; [super editWithFrame:r inView:controlView editor:textObj delegate:anObject event:theEvent]; } Patrick _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
