Open DevulderJeanPaul opened 3 years ago
Ah that's a really good point mate -- I'd not thought about filtering the input field (rather just going 'beep' when the edited field is not a number!). Thank you for the idea and the code sample - I'll need to think about how to handle fractional values and locales too (ie. 10.5 here in Australia is 10,5 in Germany so its not as simple as a check for .) as the control can step by fractional values too, but its a really solid idea.
Thanks!
Hi,
I have add a simple function for check input on the NSTextField (macOS only)
Add this extension
Add this code on the stepper view class
Call method use_filter()
mystepper1. use_filter()
Now you can hit only number in NSTextField (alphanumbers are correct check but if you hit "%" doesn't work!)
May be is utile for you in future version ?