3 Label and 1 TextField

I use Xojo web.

I try modify label text application work well as below.

LabelUp DoubleClick event:

TextFIeld1.Visible = True TextField.Text= Me.Text
TextField1 KeyPressed event:

Select Case details.KeyCode Case details.KeyEnter LabelUp.text=me.text me.Visible = False End Select

So, I multiple Label as LabelUp,LabelMiddle, and LabelDown.
How do I double-click on each label, call TextField1, and change the label text based on it?

This can be solved by increasing the number of TextField1 to three.
However, I’m actually using a WebListBox instead of a label. I have a lot of WebListBoxes, so I want to have one TextField.

I think I understand your issue, if not please make a small sample project and upload it.

Create a property on the window called TargetLabel As Label

In your label double click event add this to the top

TargetLabel = Me

You now have a reference to the last label you double clicked.

Now in KeyPressed you can

TargetLabel.Text = me.text

Thank you Julian!
Your way of doing things seems to work. But when I tried it, I got an error.

I made the TargetLabel property in the Web application, because I can’t choose Label for the Type, and I get the following error when I input Label and execute it.

[quote]WebPage1.TargetLabel Declaration
Can’t find a type with this name
TargetLabel As Label[/quote]

In addition, the following errors appear at the time of execution though the property was chosen when I tried it with the Desktop application.

Exception NilObjectException[/quote]

Any help?

I sucess!

I make TargetLabel property as WebLabel instead Label.

and code as below:

each Label

TextFIeld1.Visible = True TextField1.Text= Me.Text TargetLabel=Me


Select Case details.KeyCode Case details.KeyEnter TargetLabel.text=me.text Me.Visible = False End Select

Thank you!