jamesgates1
Member
Ive added items to a scrollbox but i need to add a click function to them.
How do i go about this?
Thanks, James.
How do i go about this?
Thanks, James.
Sub Activity_Create(FirstTime As Boolean)
Dim ImageView1 As ImageView
ImageView1.Initialize("Image") 'the assigned Event Name is "Image"
ScrollView1.Panel.AddView(ImageView1,0,0,100dip,100dip)
End Sub
Sub Image_Click
Log("Click Test")
End Sub
Sub setupscrollview
Dim level1button As ImageView
Dim level1buttonimage As Bitmap
level1buttonimage.Initialize(File.DirAssets, "level1button.png")
level1button.Initialize("levelbutton")
level1button.Bitmap = level1buttonimage
Scroll1.Panel.AddView(level1button, 40, 20, 220, 220)
End Sub
james .. have a look at this .. maybe just mispelling "level1button" vs "levelbutton" ??
Cheers mj
Sub setupscrollview
Dim level1button As ImageView
Dim level1buttonimage As Bitmap
Dim level2button As ImageView
Dim level2buttonimage As Bitmap
level1buttonimage.Initialize(File.DirAssets,"level1.gif")
level1button.Initialize("level1")
level1button.Bitmap=level1buttonimage
Scroll1.Panel.AddView(level1button,40,20,128,64)
level2buttonimage.Initialize(File.DirAssets,"level2.gif")
level2button.Initialize("level2")
level2button.Bitmap=level2buttonimage
Scroll1.Panel.AddView(level2button,40,80,128,64)
End Sub
Sub level1_Click
ToastMessageShow("level1",False)
End Sub
Sub level2_Click
ToastMessageShow("level2",False)
End Sub