Hello,
I did modify the slidingPanels example to add a button on the panel:
Sub Activity_Create(FirstTime As Boolean)
Dim panels(6) As Panel
For i = 0 To panels.Length - 1
panels(i).Initialize("panels")
panels(i).Color = Colors.RGB(Rnd(0, 255), Rnd(0, 255), Rnd(0, 255))
Dim btn1 As Button
Dim lbl As Label
lbl.Initialize("")
btn1.Initialize("")
lbl.Text = "Page:" & i
lbl.TextSize = 20
lbl.TextColor = Colors.White
panels(i).AddView(lbl, 75%x, 2%y, 60%x, 30dip)
panels(i).AddView(btn1, 25%x, 10%y, 20%x, 70dip)
Activity.AddView(panels(i), 100%x, 0, 100%x, 100%y - 80dip) 'add the panel to the layout
Activity.AddMenuItem("Panel #" & i, "Menu")
Next
....
End Sub
As result, on each of my Panels I have a button created.
I would like to add action on each individual button when it's get pressed (btn1_click) on each panel.
How do I do that ?
Thanks.
rg.
I did modify the slidingPanels example to add a button on the panel:
Sub Activity_Create(FirstTime As Boolean)
Dim panels(6) As Panel
For i = 0 To panels.Length - 1
panels(i).Initialize("panels")
panels(i).Color = Colors.RGB(Rnd(0, 255), Rnd(0, 255), Rnd(0, 255))
Dim btn1 As Button
Dim lbl As Label
lbl.Initialize("")
btn1.Initialize("")
lbl.Text = "Page:" & i
lbl.TextSize = 20
lbl.TextColor = Colors.White
panels(i).AddView(lbl, 75%x, 2%y, 60%x, 30dip)
panels(i).AddView(btn1, 25%x, 10%y, 20%x, 70dip)
Activity.AddView(panels(i), 100%x, 0, 100%x, 100%y - 80dip) 'add the panel to the layout
Activity.AddMenuItem("Panel #" & i, "Menu")
Next
....
End Sub
As result, on each of my Panels I have a button created.
I would like to add action on each individual button when it's get pressed (btn1_click) on each panel.
How do I do that ?
Thanks.
rg.