Mercurial > dwindows
comparison mac/dw.m @ 1023:8188f818eb9f
Changed initial spinbutton limits to -65536 to 65536 on Mac.
Also set initial spinbutton value from the text field.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 18 May 2011 08:20:00 +0000 |
parents | a943f973c3ff |
children | f15dc5226c35 |
comparison
equal
deleted
inserted
replaced
1022:fa1a826348b3 | 1023:8188f818eb9f |
---|---|
3480 */ | 3480 */ |
3481 HWND API dw_spinbutton_new(char *text, ULONG cid) | 3481 HWND API dw_spinbutton_new(char *text, ULONG cid) |
3482 { | 3482 { |
3483 DWSpinButton *spinbutton = [[DWSpinButton alloc] init]; | 3483 DWSpinButton *spinbutton = [[DWSpinButton alloc] init]; |
3484 NSStepper *stepper = [spinbutton stepper]; | 3484 NSStepper *stepper = [spinbutton stepper]; |
3485 NSTextField *textfield = [spinbutton textfield]; | |
3485 [stepper setIncrement:1]; | 3486 [stepper setIncrement:1]; |
3486 [stepper setTag:cid]; | 3487 [stepper setTag:cid]; |
3488 [stepper setMinValue:-65536]; | |
3489 [stepper setMaxValue:65536]; | |
3490 [stepper setIntValue:atoi(text)]; | |
3491 [textfield takeIntValueFrom:stepper]; | |
3487 return spinbutton; | 3492 return spinbutton; |
3488 } | 3493 } |
3489 | 3494 |
3490 /* | 3495 /* |
3491 * Sets the spinbutton value. | 3496 * Sets the spinbutton value. |