• 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
Re: OutlineView with big text editor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OutlineView with big text editor


  • Subject: Re: OutlineView with big text editor
  • From: Leonardo <email@hidden>
  • Date: Sun, 28 Nov 2010 20:16:13 +0100
  • Thread-topic: OutlineView with big text editor

Patrick,
I tried that method but it never gets invoked. I added it to my
NSTextFieldCell subclass.
I double click on the outline row, edit the text, press return, the text
changes, the cell closes, but the method editWithFrame never gets called. I
even tried to add
    [self setWantsNotificationForMarkedText:YES];
in the init method, but nothing changes.

Instead the method setUpFieldEditorAttributes:
gets called, but here I can just change the background color of the cell,
not the frame nor the text color...

What do I miss?

--Leonardo



Da: Patrick Mau <email@hidden>
Data: Sun, 28 Nov 2010 02:35:05 +0100
A: "gMail.com" <email@hidden>
Cc: <email@hidden>
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@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

References: 
 >Re: OutlineView with big text editor (From: Patrick Mau <email@hidden>)

  • Prev by Date: Re: view doesn't respond to very first mouse event
  • Next by Date: hidden file
  • Previous by thread: Re: OutlineView with big text editor
  • Next by thread: Re: OutlineView with big text editor [SOLVED]
  • Index(es):
    • Date
    • Thread