[Lazarus] New NumbersOnly property for TCustomEdit (r43678)

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sat Jan 11 16:40:17 CET 2014

Bart schrieb:

> An edit control that controls input based on a regex, and looking like
> a simple TEdit, might be a nice feature to have.

I found general masking problems while entering (incomplete) input, and 
while editing the previous input. Where should the cursor be moved, i.e. 
which (first) character doesn't match the specification?

IMO the problem boils down to an fault-tolerant parser, that allows to 
hilite wrong parts of some input, but does not prevent changes in other 
places, which finally *may* lead to a correct input. Not so obvious with 
only numerical input, but a big problem with e.g. phone numbers with 
embedded fixed characters.

The control should allow to hilite individual wrong characters, what's 
beyond the capabilities of simple edit controls (requires RTF or similar 
formatting features).


More information about the Lazarus mailing list