WebTextField show/hide password text?

Redoing a project in Xojo 2000r2.

Tring to show and hide password text using an icon.

Code fires bc demo text does change when Pressed method fires.

Cannot figure out how to get this code to work:

l8message.Text = "Clicked View First Password"
MsgTextReset.RunMode=WebTimer.RunModes.Single
If t2pass.FieldType = WebTextField.FieldTypes.Password Then
  t2pass.FieldType = WebTextField.FieldTypes.Normal
Else
  t2pass.FieldType = WebTextField.FieldTypes.Password
End If

Any help is appreciated.

I wasn’t able to make this work yet. updateBrowser didn’t help me either. As you will appreciate ‘any’ help, you could use this workaroung:

messageBox( t2pass.Text )

Or instead of a messageBox calling you own WebDialogue. Not ideal, but at least you will have the functionality.

1 Like

Actually, the webdialogue would provide more flexibility and customization. That may indeed be the better pop-up option.

As for the other code, I cannot figure out why the text will not display a password on demand. I’m sure someone on here with that knowledge may end up responding.

There are some hiccups with updating controls. Could be a bug, could be by design, could be a security “feature” :wink: in this particular case. It can be that you can’t change it after it has already been displayed.