Fwd: NSSlider and NSSliderCell classes
Fwd: NSSlider and NSSliderCell classes
- Subject: Fwd: NSSlider and NSSliderCell classes
- From: Lon Giese <email@hidden>
- Date: Mon, 15 May 2006 23:16:50 -0700
Begin forwarded message:
From: Lon Giese <email@hidden>
Date: May 15, 2006 6:52:43 PM PDT
To: Vinay Prabhu <email@hidden>
Subject: Re: NSSlider and NSSliderCell classes
works perfectly for me. the following. If anyone has a easier way I'm
sure Vinay would like to know.
Here's how I did it: in my NSSlider sub class HBSlider
HBSliderCell is my NSSliderCell sub class
-(void)awakeFromNib
{
[HBSlider setCellClass:[HBSliderCell class]];
NSCell *myCell = [[[HBSliderCell alloc] init] autorelease];
[myCell setFloatValue:0.5f];
[myCell setAction:[[self cell] action]];
[myCell setTarget:[[self cell] target]];
// Caution - The docs says this could damage the control - but it
works ok with the slider cell
[self setCell:myCell];
// omit the following is the default is OK
[self setMaxValue:1.0]; // any values you want here
[self setMinValue:-1.0];
[self setFloatValue:0.0f];
// you might have to set other attributes if the defaults are not
sufficient
}
On May 15, 2006, at 6:58 AM, Vinay Prabhu wrote:
Hi,
I have implemented an application.
Which makes use of the slider (NSSliderCell).
I need to redraw the color of the slider knob,
I am not sure how to connect NSSlider and NSSliderCell, so that
-(void)drawKnob:(NSRect) is overridden.
Thanks in advance for any help...
Regards
-Vinci
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s)and may contain confidential or privileged information.
If you are not the intended recipient, please notify the sender or
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:
email@hidden
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