[Lazarus] New NumbersOnly property for TCustomEdit (r43678)

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Sat Jan 11 12:22:42 CET 2014


On 2014-01-10 14:07, Michael Van Canneyt wrote:
> Because Maskedit always does a lot more than just limiting your entry to numbers.
> Alignment, adding spaces whatnot. Usually in totally unnatural ways

OK, fair enough, but all those can be configured too.

Anyway, back in my VCL and LCL days I used to simply hook a generic
OnKeyPress event to TEdit and it automatically limited the text box to
numeric data only. The event handler was something like 2-3 lines of
code. I could find it if somebody was really interested - oh, and it
worked on all platforms too.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the Lazarus mailing list