Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » how to make an editfield accept only number or date? have any examples in the documentation?
Re: how to make an editfield accept only number or date? have any examples in the documentation? [message #54983 is a reply to message #54982] Sat, 03 October 2020 19:06 Go to previous messageGo to previous message
BetoValle is currently offline  BetoValle
Messages: 204
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
ops...only number i got it:



modify.surname.SetFilter(OnlyN);

where

int OnlyN(int x){

if((x>=48) && (x<=57)){
return x;
}else{
return false;
}
}


as a date there would have to be a different type of filter to check the position of the number and the characters "/" or "-" delimiting the date.

How do I do that?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Previous Topic: sqlarray and sqlite
Next Topic: How to load your GridCtrl in background thread
Goto Forum:
  


Current Time: Sun Aug 24 09:40:02 CEST 2025

Total time taken to generate the page: 0.04411 seconds