Sub Globals
Dim myButtons As Map
End Sub
Sub Activity_Create(FirstTime As Boolean)
myButtons.Initialize
Dim ThisButton As Button
ThisButton.Initialize("ThisButton")
Activity.AddView(ThisButton, 10dip, 10dip, 100dip, 100dip)
ThisButton.Text = "This Button"
' add button to our map
myButtons.Put("ButtonA", ThisButton)
End Sub
Sub ThisButton_Click
' you could (and probably should) use the "Sender" object here
' but I am using the map we created to illustrate this concept
Dim SomeButton As Button = myButtons.Get("ButtonA")
SomeButton.Text = "That Button"
End Sub