B4J Question Password field possible?

Vinians2006

Active Member
Licensed User
Longtime User
I was trying to put a text box in the form and set it as a password entry field but I cannot find any field with this purpose. There's a way?
 

stevel05

Expert
Licensed User
Longtime User
In the JavaFx Scene builder there is a Password Field in the list under controls. If you generate members in the IDE it Dims the variable you have entered in the id field as a Node. You can change that type from Node to Textfield as PasswordField inherits directly from TextField and it should work as expected. I've only tried it quickly, so if you get any problems with it, post another question.
 
Upvote 0

ivanomonti

Expert
Licensed User
Longtime User
I did not understand how it is possible to change from TextField to PaswordField node, can be an example
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Add a password field to the layout file in Scene Builder and give it an id something like pwField

Generate Members to get the variable, it will generate something like:

<code>
Dim pwField As Node
</code>

Change that to:

<code>
Dim pwField As TextField
</code>

It should then work as a Password Field.
 
Upvote 0
Top