Notice Of Closure

Please note that this website is due to close down on 15th June 2020.

In the interim I will try to move as much content as possible over to my GitHub account. Thanks to everyone who has supported the site over the years.

» Help

Force a TEdit to accept only numeric input


I've seen the tip to make a TEdit accept only numbers but there is an easier way to do it. This is the function I use in my applications:

procedure SetEditNumeric(Handle: THandle);
  SetWindowLong(Handle, GWL_STYLE,
    GetWindowLong(Handle, GWL_STYLE) or ES_NUMBER);
Author: JM
Contributor: JM
Added: 2009-12-05
Last updated: 2009-12-05

« Return to contents »