Dim btn As Button
Dim et As EditText
btn.initialize("btn")
btn.Text="Click me"
Activity.AddView(btn,0,0,20%x,75dip)
et.Initialize("et")
et.Typeface=Typeface.DEFAULT_BOLD
et.TextSize= 18
et.TextColor=Colors.Yellow
et.Tag=et.Background 'Store original color in tag in activity_Create
et.InputType=et.INPUT_TYPE_DECIMAL_NUMBERS
Activity.AddView(et,40%x,0,20%x,75dip)
Sub btn_Click
If IsNumber(et.Text) AND et.Text > 10Then
et.Color=Colors.Red
Else
et.background=et.Tag
EndIf
End Sub