My Slider has spikes
My Slider has spikes
- Subject: My Slider has spikes
- From: Ron Fleckner <email@hidden>
- Date: Fri, 13 Apr 2007 10:26:31 +1000
Hi,
I make a popup window for a slider in my app. My problem is that the
slider has strange little barbs or spikes near the ends of it's
'track' and the ends of the track are squared off rather than
rounded. Here's the whole code I use to create the window...
NSRect mainWinRect = [theMainWindow frame];
NSRect contentRect = NSMakeRect(mainWinRect.origin.x - 20,
mainWinRect.origin.y - 150, 40,220);
customSliderWindow = [[MyCustomWindow alloc]
initWithContentRect:contentRect styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered defer:YES];
[customSliderWindow setLevel:NSPopUpMenuWindowLevel];
MyView *contentView = [[MyView alloc] initWithFrame:contentRect];
[customSliderWindow setContentView:contentView];
[customSliderWindow setDelegate:self];
slider = [[MySlider alloc] initWithFrame:NSMakeRect(3,7,35,200)];
[[slider cell] setSliderType:NSLinearSlider];
[[slider cell] setMinValue:0.0];
[[slider cell] setMaxValue:200.0];
[slider setAction:@selector(mySelector:)];
[slider setFloatValue:120.0];
[contentView addSubview:slider];
[slider release];
[contentView release];
And here's a link to a picture of the result:<http://
members.ozemail.com.au/~ronfleckner/slider.png>
How can I get rid of those spikes and have nice rounded ends in my
slider?
Ron
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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