george.scortaru
Posts: 2
Joined: Wed Jun 03, 2020 11:58 am

Hide the serial number in the Registration Dialog

Wed Jun 03, 2020 12:05 pm

Hello,

I want to hide the serial number entered by the user in the registration dialog box. Is there any way to display asterisk characters (similar to a password box) in the masked edit box from the registration dialog?

Thank you,
George Scortaru

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Hide the serial number in the Registration Dialog

Wed Jun 03, 2020 2:21 pm

Hello George and welcome to our forums,

Unfortunately, the MaskedEdit control does not support displaying the characters as asterisk.

The fact that the passwords are shown as asterisk is thanks to the "Password" attribute of the "EditBox" control:
The ES_PASSWORD style displays all characters in a single-line edit control as asterisks. An application can define a different character to display by using the EM_SETPASSWORDCHAR message, as described later in this topic.
Please let me know if there is anything else I could help you with and I will gladly assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

george.scortaru
Posts: 2
Joined: Wed Jun 03, 2020 11:58 am

Re: Hide the serial number in the Registration Dialog

Thu Jun 04, 2020 10:03 am

Thank you for information.

If I customize the Registration dialog and replace the MaskEdit with an EditBox with the password property set will work and the only disadvantage is that the serial number validation will be lost, the user should enter correctly the digits and also the separators?

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Hide the serial number in the Registration Dialog

Thu Jun 04, 2020 12:46 pm

Hello George,

There are two disadvantages when not using the masked edit, and those are:

1. the masked edit is able to evaluate the input based on the length, e.g.:

If the template looks like this:

Code: Select all

###-###
the masked edit expects 6 characters to be input.

2. the masked edit automatically inserts the hypen ("-") for the user, making it easier.

However, yes, it is possible to replace it with an EditBox control. To do so, please proceed as it follows:

- delete the MaskedEdit control

- add the EditBox control

- set the EditBox's control property to:

Code: Select all

PIDKEY
- add a "Control Condition" for the EditBox control, as it follows:

Condition: SERIAL_VALIDATION = "FALSE"
Action: Disable


RegDlg.png
RegDlg.png (208.23KiB)Viewed 7124 times

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”