Monday
Input filter in the edit box
In order EditBox can only accept input only certain characters. For example in order EditBox can only be filled with numbers, not characters.
The following program shows how to EditBox can only be filled with hexadecimal numbers, believe (0 .. 9), (A.. F), or (a.. F).
Procedure TFrom1.Edit1KeyPress (sender: TObject; Var Key: Char);
begin
if not(((Key>#48) and (key<=#57)) 0r ((key>=#65) and (key<=#70)) or (key>=#97) and (key<=#102)) or (key=#8)) then key:= #0;
end;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment