Place labels dynamically

DPH

Member
Licensed User
Longtime User
I have a program which has a variable list of maps that I want to link to from labels. I want to place the labels on a scroll view which is sized to the screen resolution. How can I dynamically add the labels and click events to the scroll view? I want the labels placed in horizontal rows.
 

Sirrab

Member
Licensed User
Longtime User
I have done it like this in my app

B4X:
Dim lastpaid(15) As Label
scrollline = scrollline + 1
scrolllineypos = 40
lastpaid(scrollline).Initialize("taskdone")
  
scrolllineypos = scrolllineypos + 40
MainScroll.Panel.AddView(lastpaid(scrollline),50%x,scrolllineypos + 40dip,50%x,20dip)
 
Upvote 0
Top