• 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: NSSegmentedControl Display Bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSegmentedControl Display Bug?


  • Subject: Re: NSSegmentedControl Display Bug?
  • From: Todd Yandell <email@hidden>
  • Date: Sun, 31 Jul 2005 14:53:54 -0500

Hi,

I had to get around this bug for one of my projects, too. I did it with a subclass of NSSegmentedControl and a private cell method. I also filed a bug report on it almost two months ago: <rdar:// 4139593>. Anyway, here's how I did it:

#define NormalSegmentedCellStyle 1
#define FlatSegmentedCellStyle 2

@interface AOSegmentedControl : NSSegmentedControl
{
}
@end

@interface NSSegmentedCell ( PrivateMethod )
- (void)_setSegmentedCellStyle:(int)style;
@end

@implementation AOSegmentedControl

- (void)awakeFromNib
{
    [self setFrameSize:NSMakeSize([self frame].size.width, 26)];
}

- (NSCell *)cell
{
    NSSegmentedCell *cell = [super cell];
    [cell _setSegmentedCellStyle:FlatSegmentedCellStyle];
    return cell;
}

@end
_______________________________________________
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


  • Follow-Ups:
    • Re: NSSegmentedControl Display Bug?
      • From: Philip Dow <email@hidden>
References: 
 >Re: NSSegmentedControl Display Bug? (From: Ruediger Hanke <email@hidden>)
 >Re: NSSegmentedControl Display Bug? (From: Shaun Wexler <email@hidden>)
 >Re: NSSegmentedControl Display Bug? (From: Ruediger Hanke <email@hidden>)

  • Prev by Date: Re: Deployment build generates editable Applescript file
  • Next by Date: Re: Hiding a control on MacOS10.2
  • Previous by thread: Re: NSSegmentedControl Display Bug?
  • Next by thread: Re: NSSegmentedControl Display Bug?
  • Index(es):
    • Date
    • Thread