Topic: label to edit box

Hello guys

How can I copy a label to an edit box?

Complements
Diogo Teixeira

Re: label to edit box

Form1.Edit1.Text := Form1.Label1.Caption;

Re: label to edit box

Hello ehwagner
Thanks for the help. smile

Re: label to edit box

Hello ehwagner

I want to make a copy from a label to a combobox, like I was asking before.
What is the method to make or doesen´t exist?

Complements
Diogo Teixeira

Re: label to edit box

If I understand you correctly, you cannot copy a label to a combobox. However, if you want to set the combobox to the value of a label, you can do that with a one line script. This requires that your label is actually a value in the Lookup table. See attached for an example. The label on Form1 has a value of "B". This value is used to select the id of the record containing this value in the Lookup table. The combobox item id is set to the selected "B" record id value. The combobox now displays the same value as the label "B" on the form.

Post's attachments

Attachment icon Label to Combo.zip 335.36 kb, 168 downloads since 2021-07-24