Witam,
Dla Tedita pod zdarzeniem OnKeyUp przypisałem procedurę
procedure licz_sume(Sender: TObject; var Key: Word;
Shift: TShiftState);
Jak mogę ją wywołać w zdarzeniu OnKeyPress ?
Witam,
Dla Tedita pod zdarzeniem OnKeyUp przypisałem procedurę
procedure licz_sume(Sender: TObject; var Key: Word;
Shift: TShiftState);
Jak mogę ją wywołać w zdarzeniu OnKeyPress ?
Po prostu licz_sume(Sender, ..., ...);
?
OnKeyUp
jest "po" OnKeyPress
i wywoła się samo. Jeśli musisz z jednego wywołać drugie to znaczy, że coś masz nie tak zaprojektowane
Zdarzenie OnKeyUp jest zdarzeniem typu TKeyEvent. Cytat z mojego help'a:
"The TKeyEvent type points to a method that handles keyboard events. The Key parameter is the key on the keyboard. For non-alphanumeric keys, you must use virtual key codes to determine the key pressed. For more information, see Virtual Key codes."
A jeśli tego Word nie będzie w "Virtual Key codes", to jego drugi znak traktuj jako Char w KeyPress. No i uwzględnij to, co masz w "Shift: TShiftState".
W sumie to powinno być "dla początkujących".