when I create a password field at run time, the object does not pass by FocusChanged and TextChanged events
B4X:
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private txPWD As TextField
Private Bt As Button
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
Bt.Initialize("")
Bt.Text="Ok"
MainForm.RootPane.AddNode(Bt,10,50,-1,-1)
txPWD.Initialize("txPWD")
txPWD = CreatePasswordField
MainForm.RootPane.AddNode(txPWD, 10,10,-1,-1)
MainForm.Show
End Sub
Private Sub TxPWD_FocusChanged (HasFocus As Boolean)
Log("xxx")
End Sub
Private Sub TxPWD_TextChanged (Old As String, New As String)
Log("yyy")
End Sub
Sub CreatePasswordField As TextField
Dim jo As JavaObject
jo.InitializeNewInstance("javafx.scene.control.PasswordField", Null)
Return jo
End Sub