B4J Question How can i change PasswordField to TextField

Knoppi

Active Member
Licensed User
Longtime User
How can i change PasswordField to TextField ?

i want to do something like this
showpassword.png

when 'Show Password' is checked then the PasswordField should be changed to standard TextField
 

stevel05

Expert
Licensed User
Longtime User
The simplest solution would be to put another text field over it when needed. I don't think you can change the field type. Or have one already that's hidden and show it when needed.
 
Upvote 0

Knoppi

Active Member
Licensed User
Longtime User
I really wanted to avoid this solution
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Upvote 0

udg

Expert
Licensed User
Longtime User
You may want to check here.
As you can see there are methods get/set Input_Type. I guess that you should use JavaObject or Reflection libraries.

ps: ooops, this is B4J forum... sorry.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
You may have success if you try changing the textformatter attached to the passwordfield

It doesn't appear to be that simple, it appears there is no textformatter attached, the output is probably managed by the skin.
 
Upvote 0
Top