B4J Question Password Field

Discussion in 'B4J Questions' started by BeneBarros, Jun 11, 2015.

  1. BeneBarros

    BeneBarros Active Member Licensed User

    when I create a password field at run time, the object does not pass by FocusChanged and TextChanged events

    Code:
    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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. BeneBarros

    BeneBarros Active Member Licensed User

Loading...