I'm making an app using DelphiFMX GUI library for Python. I need to have a component where I can enter a password and have that password masked. Sure I can use an Edit
component, but then the password is in plain text and not masked.
How do I mask a password in an Edit component or is there a component specifically for passwords?
Using an Edit
component is actually the correct way. There's a Password
boolean property that you simply need to set to True
and it'll work then:
self.myPasswordBox.Password = True
Here's the full code I used to create the Edit:
self.myPasswordBox = Edit(self)
self.myPasswordBox.Parent = self
self.myPasswordBox.Align = "Center"
self.myPasswordBox.Width = 250
self.myPasswordBox.Password = True # Make it a password box that is masked