'Class module
Sub Class_Globals
Public edt As EditText
Private btn As Button
End Sub
Public Sub Initialize (TargetModule As Object, EventName As String)
End Sub
Public Sub DesignerCreateView(Base As Panel, Lbl As Label, Props As Map)
edt.Initialize("edt")
btn.Initialize("btn")
edt.TextSize = Lbl.TextSize
edt.Text = Lbl.Text
btn.Text = "Del"
Base.AddView(edt, 0, 0, Base.Width - 50dip, Base.Height)
Base.AddView(btn, Base.Width - 50dip, 0, 50dip, Base.Height)
edt_TextChanged("", edt.Text)
End Sub
Sub btn_Click
edt.Text = ""
End Sub
Sub edt_TextChanged (Old As String, New As String)
btn.Enabled = New.Length > 0
End Sub