How to get panel values with edits for an array of strings? I need 10 records to be typed into edits that are inside a panel, and thus save to an array of strings or integers.
How to get panel values with edits for an array of strings? I need 10 records to be typed into edits that are inside a panel, and thus save to an array of strings or integers.
procedure Form1.Button1Click(Sender: TObject)
var
//declaro o array
valores: array of string;
begin
//Altero a quantidade de items do array, no caso 10.
SetLength(valores, 10);
//Passo o valor dos edits para os itens do array
//NOTA: Arrays começam pelo índice 0. No nosso caso os itens do nosso array
//vão de 0 até 9.
valores[0] := Edit1.Text;
valores[1] := Edit2.Text;
...
valores[9] := Edit10.Text;
end;