Password-style EditLines
Published 31 MAR 2014 at 11:43:54PM
During the recent Antipodean roadshow a request was made for some new EditLine functionality typically found on mobile operating systems such as Android. Specifically this was to provide a way for a password-style edit control to allow each typed character to be shown briefly before being masked like so:
[caption id="attachment_1196" align="aligncenter" width="463"] New Password Functionality[/caption]
Thankfully this was a relatively simple request and we soon added two new properties to implement this:
- PASSWORDSTYLE
- PASSWORDPEEKTIME
PASSWORDSTYLE Property
This is a boolean property that changes the EditLine into a password-entry style control when set to TRUE. When set to FALSE the control acts as a normal EditLine. This property can be set at runtime to mask or unmask the entire password if desired.
PASSWORDPEEKTIME Property
This property contains the number of milliseconds to display an entered character before masking it. When set to 0 the entered character is never displayed. This property also requires PASSWORDSTYLE to be set to TRUE, otherwise it has no effect.
(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).
Comments
At 01 APR 2014 12:09AM dbakke wrote:
How do those password-styles edit lines that have "eye" buttons which allows you to see the entire password temporarily get created? Are those custom controls?
At 01 APR 2014 12:26AM Captain C wrote:
Hi Don - I believe the ones seen in IE are (are they the ones you are referring to?) - I've never seen any documentation to suggest they got added to User32/ComCtl32.
You could do a similar thing in OI using the PASSWORDSTYLE property and a TIMER event - I nearly implemented a REVEALPASSWORD method, and may do so if I get time …
At 01 APR 2014 10:17AM Captain C wrote:
Digging into this a little further it appears that it's a Windows 8.x feature - but it seems restricted to XAML and IE (PasswordBox control) and it's also controlled by a group policy setting. Still no mention of Win32, and I don't see any changes to an OI Password Edit when run under Win8.