### TextField Clearable

This is an example of a defining a ControlsFX Clearable TextField.
Region Project Attributes
#MainFormWidth: 400
#MainFormHeight: 400
End Region
Region Notes
'B4J HowTo ControlsFX ClearableTextField
'Download and copy jcontrolsjar+xml to the B4J additional libraries folder
'ControlsFX WebSite: http://fxexperience.com/controlsfx/
'ControlsFX JavaDoc: http://controlsfx.bitbucket.org
'Select CustomTextField to get info about the textfield
End Region
`Sub Process_Globals
Private fx As JFX
Private MainForm As Form
'Define label above the clearable TextField
Private lbl As Label
'Define the textfield which will be customized as a clearable textfield
Private tf As TextField
End Sub`
`Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Title = "B4J HowTo ControlsFX ClearableTextField"
MainForm.SetFormStyle("UTILITY")
MainForm.Resizable = False
MainForm.Show
'Show a label above the clearable TextField
lbl.Initialize("")
lbl.Text = "Enter Text:"
MainForm.RootPane.AddNode(lbl, 10, 60, 200, 40)
'Create the JavaObject being a controlsfx textfield class
Dim jo As JavaObject
jo.InitializeStatic("org.controlsfx.control.textfield.TextFields")
'Create a clearable textfield and assign to the already defined textfield
tf = jo.RunMethod("createClearableTextField", Null)
tf.TooltipText = "This is a ControlsFX Clearable Textfield"
'Add the clearable textfield to the rootpane
MainForm.RootPane.AddNode(tf, 10, 100, 200, 40)
End Sub`

Changed: , Category: ControlsFX, File: T6C176M1280.htm, ID: 1280