Last question for a while gents.
This is where the beginner doesnt understand.
I want to limit the user from capturing anything else but NUMBERS in a Tcombobox.
From my reading, that must be done in the KEYDOWN event and not the Keypress like in the case of a Tedit control.
The Keydown event :
procedure TForm1.ComboBox4KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
VS
The Keypress event:
procedure TForm1.ComboBox4KeyPress(Sender: TObject; var Key: char);
In the first line the KEY : Word and the second one Key:Char.
I know how to limit the text input using the CHar :
if not (Key in ['0'..'9', '.', #8, #9]) then Key := #0;
I still need to learn how to adapt that to work with the first (keydown) event.
If someone can show me please.
-Peter