View Single Post
  #3 (permalink)  
Old 04-16-2008, 02:18 PM
sukatoa's Avatar
sukatoa sukatoa is offline
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 527
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
Try this algorithm, ( in a GUI "textfield" )

Before the user inputs, save the current value of textfield on a variable.
in every input, check the last character for decimal and dash
if satisfied, allow and replace the saved value to this new one.
else, remove the text, and replace it with the value that was stored.

kind regards,
sukatoa
Reply With Quote