• 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: Changing a custom field editor's position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Changing a custom field editor's position (From: Ulai Beekam <email@hidden>)

  • Prev by Date: Re: case-insensitive NSDictionary
  • Next by Date: Re: any recommended zip framework ?
  • Previous by thread: Changing a custom field editor's position
  • Next by thread: Fast dictionary with integer keys?
  • Index(es):
    • Date
    • Thread