Textfields on Sub-window keep data after closing.

Hi everyone. I have a sub-window which I am using to change the password once the user has entered the application, it has 3 Textfields, Current password, new password and confirm new password. This sub-windows can be open from a menu option.

When I put some info on each of the Textfields and close the window, if I re open this window, the data that has been entered before remains in the Textfield.

Is there anything I could do to avoid this??

Thanks!

You just have rebuild the window every time you click the menu button. …or for better performance: rebuild or better just empty only the Fields you don’t want to be still filled when you click the button.

Currently I guess you build the window somewhere and then hold a reference in a variable. When you then later click the button you don’t rebuild the window and just open the window from the variable. This way the window instance always stays the same.