Re: NSSegmentedControl Display Bug?
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