Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sun Nov 19, 2017 1:48 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Validate numeric editbox
PostPosted: Fri Mar 06, 2009 8:29 am 
Offline

Joined: Wed Jan 21, 2009 8:32 am
Posts: 2
I have a edit box type numeric with a min and max. The user can still enter values outside the min-max range and they appear in the box. I want to tell teh user that the value is out of range and correct the value so it is inside the range. for example
min = 1 max = 2, the user enters 3. I want to set the value back to 2.
If I try this in OnChange() the value in the box does not get changed, it remians 3.
Is there a way to change the value in the box before FinishEdit()?


Top
 Profile  
 
PostPosted: Fri Mar 06, 2009 10:37 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
The Min and Max properties only apply if the editbox is set to a numeric type. I believe that they mention this in their documentation.

Try changing the boxType property of the EditBox to eb_Numeric, eb_NumericBlank or eb_NumericStrict and see if that triggers the behavior you desire.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Fri Mar 06, 2009 12:05 pm 
Offline

Joined: Wed Jan 21, 2009 8:32 am
Posts: 2
Yes it is eb_numeric.


Top
 Profile  
 
PostPosted: Fri Mar 06, 2009 3:00 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Are you saying that you are able to enter invalid numbers (i.e. < min or > max) when you are set to EB_NUMERIC? In particular when the FinishEdit Event fires, the box should always contain a valid value.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group