Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How to Mask Input fields (How do you mask an input field to achieve similar behavior to Password input in HTML?)
How to Mask Input fields [message #55555] Sat, 21 November 2020 22:51 Go to next message
steveo is currently offline  steveo
Messages: 11
Registered: November 2020
Promising Member
I would like to be able to toggle an input field between ordinary display of text entered, and masked input to ensure privacy of passwords and secrets. How would one do that with U++?
Re: How to Mask Input fields [message #55556 is a reply to message #55555] Sat, 21 November 2020 23:17 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 830
Registered: September 2012
Location: Poland, Kraków
Experienced Contributor
Hello,

Try to use Password() method of EditField. It is documented on this site.

The usage is simply let's assume that the layout has 'edit_password' control (EditString). The in order to hide input of
// Constructor
CtrlLayout(*this, "Login Window");
edit_password.Password();


Mirek, it would be nice to have SetPassword property in usc file...

Klugier


Ultimate++ - one framework to rule them all.
Re: How to Mask Input fields [message #55558 is a reply to message #55556] Sat, 21 November 2020 23:26 Go to previous messageGo to next message
steveo is currently offline  steveo
Messages: 11
Registered: November 2020
Promising Member
That's awesome, I totally missed that, not for lack of trying. Thanks!
Re: How to Mask Input fields [message #55559 is a reply to message #55558] Sat, 21 November 2020 23:43 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 828
Registered: August 2007
Experienced Contributor
Hello steveo,

I have attached a simple widget called EditSecretText. It is a simple password dialog, similar to EditString and EditStringNotNull.
It can display images, links, formatted text, etc (using qtf) but also has a simpler modes.

You may find it useful. Just open the archive and run the example and see if it fits your needs. It may give you the idea.


Best regards,
Oblivion


Previous Topic: Layout not visible
Next Topic: Reliably converting between std::vector<uint8_t> and WString
Goto Forum:
  


Current Time: Mon Jan 25 21:42:16 CET 2021

Total time taken to generate the page: 0.01140 seconds