Ciao ragazzi,
non ne vengo fuori… vorrei applicare una maschera a un TextField che mi permetta di inserire solo valori tipo:
14.23
145.12
100
1450.2
e cos via…
Il problema che se metto “#.##” non posso inserire 145.12 e se metto tipo ###.## non posso inserire 1.13 …
Vorrei inoltre forzare il separatore decimale come punto e non come virgola !
Qualcuno ha qualche idea ?
Grazie !
Io mi sono fatto una routine sull’evento keydown sul simile …
if IsNumeric( Key ) then
// Allow numeric
return false
elseif ( Key = “,” ) and ( InStr( me.Text, “,” ) = 0 ) then 'and me.Text.Len > 0 then
// Handle decimal points
return false
elseif ASC( Key ) < 32 then
// Allow control keys (e.g. the backspace key)
return false
elseif ASC( Key ) = 9 then
// Allow control keys (e.g. the tab key)
return false
elseif ASC( key ) = 13 then
Action()
return true
else
// Ignore all other input
return true
end if
poi vedi tu i tuoi eventuali bisogni.
Ciao
Grazie @Toni Reolon, proverò con quanto hai suggerito !
E visto che siamo vicini… te vanza na ombra !