Hi,
I am a new basic4android user.
1. I created 10 buttons and text (1 to 10)
2. I also created a sub to disable all button at the same time
My Question is:
I want to create a sub that changes All Buttons's text from eg (1 to 10) to (5 to 14) at the same time.
( when I click another button eg btnText , all 1 to 10 buttons must change to 5,6,.. 14. )
Any Suggestion?
My code for 1 and 3 is:
Sub Activity_Create(FirstTime AsBoolean)
'1 create 10 buttons
For i = 0 To 9
Dim Btn AsButton
Btn.Initialize("Btn")
Btn.Text= i+1
Activity.AddView(Btn, 10dip, 10dip + 60dip * i, 200dip, 50dip)
Next
End Sub
Sub DisableAllButtons
'2 disable all button at the same time
For i = 0 To Activity.NumberOfViews - 1
Dim v As View
v = Activity.GetView(i)
If v Is Button Then 'check whether it is a Button
v.Enabled = False
End If
Next
End Sub