Edit receive caption from multiple labels

1

I would like a TEdit to receive the value of a TLabel and clicking on another TLabel the caption property would concatenate what was received before.

Ex:

edit.text := valorlabel1 valorlabel2 valorlabel3 .....

I tried to use a global variable , but one hour would be impractical.

var variavel_global1 : string;

By clicking on the label:

procedure TForm3.edt_variavel1Click(Sender: TObject);
begin
edit1.Text := edt_variavel1.caption + ' ';
variavel_global1 := edit1.Text;
end;

Is there any other way to do this?

    
asked by anonymous 07.12.2015 / 14:47

1 answer

2

The simplest way would be, in the onclick event of the label:

Edi1.Text: = Edit1.Text + TLabel (Sender) .caption + '';

    
07.12.2015 / 17:37