Getting value from textfield into another

Simple question, what event can I use to get the value of 1 text field into another. Using “open” does not work as the textfield is not populated at that point it seems.
Is it a case of pushing from the textfield that has the data through say TextChange event. This approach works but I want to know if that is the recommended way. Just trying to make sure I don’t start creating bad habits in my early xojo years :wink:

It depends what you are trying to achieve has to how you would achieve this. For example, are you trying to get hold of the initial value or are you trying to get hold of the text when it changes?
Use the TextChange event if you want to copy over the text from one textfield to another (as the text is typed).

HSH

Yeah, textchange.

Thanks. Glad I identified the right event :slight_smile:

In my eyes the textchange-event is not very good, because the event fires after each letter, you are typing in.
So you have to ask yourself, when you want to do it?
One idea would be the Lostfocus-event, or the gotFocus-event at the beginning.

[quote=179115:@Robert Blazek]In my eyes the textchange-event is not very good, because the event fires after each letter, you are typing in.
So you have to ask yourself, when you want to do it?
One idea would be the Lostfocus-event, or the gotFocus-event at the beginning.[/quote]

What is the harm in duplicating the content real time ? Unless the Text property contains megabytes of data, it takes but a few microseconds.