1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
TEditOnChange(Sender: TObject)
procedure TraiteCaption(Traitement: Integer; InputCar: String; OutputEdit: TEdit);
var
Output: String;
begin
Output := ' '; // valleur par defautr = espace vide
if (inputCar >= '0') and (InputCar <=9) then begin
case Traitememnt of
1: // traitememnt cas 1, remplir Output
2: // tritememnt cas 2
etc..
end;
end;
OutputEdit.caption := Output;
end;
var
Caption: String;
begin
Caption := MonchampsEdit.Caption + '----'; // caption contient toujour 4 caractères minima. aucun bug possible entre Caption[1] et Caption[4]
TraiteCaption(1, Caption[1], EditSortie1);
TraiteCaption(2, Caption[2], EditSortie1);
TraiteCaption(3, Caption[3], EditSortie1);
TraiteCaption(4, Caption[4], EditSortie1);
End; |
Partager