The only problem is, that str_MaskedPassword contains asterisks in the number of characters of the last entered password.
The referenced variabl, which is passed to the LoginMgmt is emptied upon clicking OK or CANCEL.
How can I set the value of the str_MaskedPassword everytime the Login-Dialog is opened?
You can also use the function in the VisuDialogs library called VisuDlg_GetPasswordString to convert a string to asterisks. In your "Text Field" you would set the "Text Variable" to VisuDlg_GetPasswordString(stOrg:= str_Password)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi erveryone,
I am on CodeSys 3.5.16.
In the CodeSys login dialog the password field is always masked with three asterisks
So I came up with my own password field as visu object, which I reference to in the login dialog.
This is how the visu object looks like:
The OnMouseDown-Event:
The OnDialogCLosed-Event triggers the following ST-Code:
It basically works.
The only problem is, that str_MaskedPassword contains asterisks in the number of characters of the last entered password.
The referenced variabl, which is passed to the LoginMgmt is emptied upon clicking OK or CANCEL.
How can I set the value of the str_MaskedPassword everytime the Login-Dialog is opened?
Thanks!
Best regards,
LeFish
Last edit: lefish 2021-08-05
Alright, while writing the above post I came up with the trivial solution myself, which I just successfully tested:
Simply change the str_MaskedPassword variable to be InOut and handle it the same way like the unmasked str_IOPassword InOut variable...
Best regards,
LeFish
Last edit: lefish 2021-08-05
You can also use the function in the VisuDialogs library called VisuDlg_GetPasswordString to convert a string to asterisks. In your "Text Field" you would set the "Text Variable" to VisuDlg_GetPasswordString(stOrg:= str_Password)