Edit receive caption from several Abels

Asked

Viewed 505 times

1

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

Ex :

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

I tried to use a global variable, but one hour will be unfeasible.

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 this could be done?

1 answer

2


The simplest way would be at the onclick event of the label:

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

  • Nice guy, it was what I needed... Started right on the site, welcome

Browser other questions tagged

You are not signed in. Login or sign up in order to post.