Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim tf As TextField
Dim b1, b2 As Button
Dim flag As Boolean = False
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
tf.Initialize("tf")
b1.Initialize("b1")
b1.Text = "b1"
b2.Initialize("b2")
b2.Text = "b2"
b2.Enabled = False
MainForm.RootPane.AddNode(tf,10,10,120,30)
MainForm.RootPane.AddNode(b1,10,50,100,20)
MainForm.RootPane.AddNode(b2,10,80,100,20)
End Sub
Sub tf_TextChanged (Old As String, New As String)
If flag = True Then b2.Enabled = True
End Sub
Sub b1_Click
Log("format text in tf")
flag = True
tf.Text = tf.Text.ToUpperCase
b1.Enabled=False
End Sub
Sub b2_Click
Log("TextArea now reads : "&tf.text)
End Sub