Re: My Slider has spikes
Re: My Slider has spikes
- Subject: Re: My Slider has spikes
- From: Carmin Politano <email@hidden>
- Date: Thu, 12 Apr 2007 20:41:26 -0400
Those "spikes" appear to be the nice rounded ends attached to the
wrong end.
This may be an OS "feature" when the coordinate system is reversed
(or not reversed).\
(Thought presumption)
On Apr 12, 2007, at 8:26 PM, Ron Fleckner wrote:
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:
40verizon.net
This email sent to email@hidden
_______________________________________________
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