Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mkristain

macrumors regular
Original poster
Aug 18, 2011
115
0
hello,

i am using slider and a text field when i move or drag the slider than i got its value and display in text field
Code:
	float sliderValue = [ slider floatValue ];
	
	[TextField setStringValue:[NSString stringWithFormat:@"%.1f", sliderValue ]];

but when i try opposite of this,means enter some value in text field and trying slider move according to this value but

- (void) controlTextDidChange:(NSNotification *)obj

event not generated thats why slider not move with text field values .

so please can anyone help me how can i move the slider according to enter value in text field and how can i set the limit in this text filed to enter only numbers and must me less that text length of 4 digit.

please guide me for this.

thanks in advance.
 
Read the documentation. I'm sorry, but that's something you can accomplish just by spending 2 minutes reading it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.