I thought about creating codes like this and embarks them on a CustomView class.
So it could be used with BJ4 in visual design in super easy way.
But it seems that people don´t think it´s relevant.
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private tf As TextField
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
tf.Initialize("tf")
MainForm.RootPane.AddNode(tf, 10, 10, 300, 50)
End Sub
Sub tf_TextChanged (Old As String, New As String)
If IsNumber(New) = False Then
CSSUtils.SetBorder(Sender, 2, fx.Colors.Red, 2)
Else
CSSUtils.SetBorder(Sender, 0, fx.Colors.Transparent, 0)
End If
End Sub