Re: NSSegmentedControl Display Bug?
Re: NSSegmentedControl Display Bug?
- Subject: Re: NSSegmentedControl Display Bug?
- From: Philip Dow <email@hidden>
- Date: Sun, 31 Jul 2005 22:35:58 +0200
Todd, good deal! I've added the AOSegmentedControl to my project and
it works great. Much simpler to implement than the window proxy,
although that bit of code is an seriously impressive hack.
-Phil
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
_______________________________________________
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