Re: Getting multiple sliders to interact in an NSMartix
Re: Getting multiple sliders to interact in an NSMartix
- Subject: Re: Getting multiple sliders to interact in an NSMartix
- From: j o a r <email@hidden>
- Date: Fri, 24 Jan 2003 15:42:37 +0100
What about something like this where you have two sliders connected to
the same action:
- (IBAction) sliderAction:(id) sender
{
int newValue = [sender intValue];
[sliderOne setIntValue: ((sender == sliderOne) ? newValue : (100 -
newValue))
[sliderTwo setIntValue: ((sender == sliderTwo) ? newValue : (100 -
newValue))
}
j o a r
On Friday, Jan 24, 2003, at 14:40 Europe/Stockholm, Alexander Schutte
wrote:
for some time i am trying to get a set of liders to inteact with each
other, thus making a new control.
what i want to do is to get 2 or more sliders to add up their value
and not let the total surpass 100%
while each slider has a scale from 0% to 100%.
I want to use the sliders to get a use to choose an allocation from
the slides.
Since it would be best to create new object to do as a subclass of
NSMatrix i
tried to get this to work bu i cant get the values of the separate
sliders to interact.
I did the same thing in flash mx (javascript) but i want this to be an
real cocoa app.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.