10 to 1, 1111111111, the eighth is 1, the automatic input of the rat in B
10 2, 2222222222, the eighth is 2. The automatic input of cattle in B
Such,,
Due to A box is editable, additionally, you can also manually input, so when the number is more than ten or less than 10, don't display any content in B,
When the equipment by reading card, due to the length of the inside is certainly A 10, so after reading, B will automatically display,
Pray god give a train of thought
CodePudding user response:
In A onchange event B should display content,CodePudding user response:
1, insert card incident, have A read characters;2, A OnChange events:
procedure TForm1. Edit1Change (Sender: TObject);
Var s: a string;
I: integer;
The begin
If Length (Edit1. Text)=10
Then the begin
I:=StrToInt (Copy (Edit1. Text, 8, 1));
In Case of I
0: Edit2. Text:='0';
1: Edit2. Text:='mouse';
2: Edit2. Text:='cattle';
3: Edit2. Text:='3';
4: Edit2. Text:='4';
5: Edit2. Text:='5';
6: Edit2. Text:='6';
7: Edit2. Text:='7';
8: Edit2. Text:='8'.
9: Edit2. Text:='9'.
end;
End
The else Edit2. Text:=' ';
end;
CodePudding user response: