ContentsChanged Textfield.TextChange event

Hi,

I have a window and wanted to use the contentsChanged property to check if an user has changed something in the window before closing it. I have a form with Textfields with an event TextChange that will set the ContentsChanged property of the window to True when triggered.

The issue is that I want to populate these textfields when the window is loading (before the user start editing) and when setting self.TF_Name.text = “Test”, the TextChange event is triggered and it changes the property of the window.

I could set a property (like initOngoing as boolean) and check it on the TextChange event to know if the form is loaded but I am retrieving data from multiple APIs to populate theses fields (asynchronous using URLConnection) and I have to check that all APIs calls are done without error to set this property to False for example.

Any ideas on how to do this?

Thank you.

Start with disabled Controls and in the TextChange Event, put If Me.Enabled Then...

So I have to enable all controls once the data are loaded, I will try this

Add a Method to the Window which takes a Boolean Parameter. In this Method write a Line for each needed Control like TF_Name.Enabled = theBooleanParameter . So you could very easy enable/disable all affected Controls with a simple Method Command.

Or you “monitor” the Status of all Connections with a Timer in Mode.Multiple and disable from there all Controls as long as a Connection is active and enable them as soon as all Connections are done.

It’s working well, thank you !