• 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: NSBox Title Position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBox Title Position


  • Subject: Re: NSBox Title Position
  • From: Steven Spencer <email@hidden>
  • Date: Mon, 6 Dec 2004 23:50:48 +0000

For the record, a solution - add the following to a sub-class of NSBox.

- (void)drawRect:(NSRect)aRect
{
NSRect rct = [self titleRect];
rct.origin.x = 0.0;


NSString *str = [self title];
[self setTitle:@""];
[super drawRect:aRect];
[self setTitle:str];


[[self titleCell] drawWithFrame:rct inView:self];
}

- Steve Spencer
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Localized decimal point?
  • Next by Date: Flogging a dead horse (was isa swapping, resknife sources, interf ace builder crashing)
  • Previous by thread: NSBox Title Position
  • Next by thread: Save as, export to: implementation
  • Index(es):
    • Date
    • Thread