Hello,
I created with code 3 Panels with inside a button and a label.
I want when I click the button on the Panel1 write to the Label Panel1 "This is Panel1" and then, if I click the button Panel2 write to the label Panel2 "This is Panel2" and same for the Panel3
How do I code Button_Click?
thank you
I created with code 3 Panels with inside a button and a label.
I want when I click the button on the Panel1 write to the Label Panel1 "This is Panel1" and then, if I click the button Panel2 write to the label Panel2 "This is Panel2" and same for the Panel3
How do I code Button_Click?
thank you
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim width, height As Int
'Cree des Panels
width = 300dip
height = 80dip
For y = 0 To 2
Dim P As Panel
Dim B1, B2 As Button
Dim L As Label
P.Initialize("")
P.Color = Colors.Blue
Activity.AddView(P,10dip, 10dip + y * (height + 10dip), width, height)
MyPanel(y) = P
B1.Initialize("BtnPre")
B2.Initialize("BtnPost")
P.AddView(B1,10dip, 10dip, 50dip, 30dip)
MyButtonPre(y) = B1
L.Initialize("")
L.Color = Colors.Red
L.TextColor = Colors.White
P.AddView(L,100dip, 50dip, 100dip, 30dip)
MyLabel(y) = L
Next
End sub
Sub BtnPre_Click
????????????????????
End Sub
Last edited by a moderator: