Page 1 of 1

StringGadget : #PB_String_Float

Posted: Fri Aug 26, 2005 1:17 pm
by Flype
is it possible to add a new flag for the stringgagdet

-> #PB_String_Float which will allow only 'numeric' characters and only one '.' or ','

but at this moment which is the best way to enter a float value in stringgadget ?

Posted: Fri Aug 26, 2005 2:16 pm
by Fred
Good suggestion. For the moment, i would check the EventType() 'Change' and remove the unallowed character (but it could be a bit jerky as the text will be displayed then removed). Another way is to do a post validation check.

Posted: Fri Aug 26, 2005 2:19 pm
by Dare2
I do something similar for a mask but then the carat position is lost. Any way to handle that?

Posted: Tue Aug 30, 2005 3:24 am
by Joakim Christiansen
Yeah, and I also want it to support negative values.
The ones with '-' before the number...

Posted: Tue Aug 30, 2005 2:47 pm
by TerryHough
See this post. I am hoping for two additional parameters for the StringGadgetl Filters and Masks
viewtopic.php?p=58907#58907

or take a look at my Masked & Filtered Input here
http://elfecc.no-ip.info/purebasic/#MaskedInput