Share My Creation Another ScrollView example

Attached another CustomScrollView example.
Just to show what could be done.
Two different item layouts.
Some of the ProgressBars are dynamicaly changed with their percentage values.

Best regards.
 

Attachments

  • CustomScrollView.zip
    9.3 KB · Views: 8,550
  • CustomScrollView.jpg
    CustomScrollView.jpg
    41 KB · Views: 75,801

chinku_chan

New Member
Hi Klaus - super newbie here.

From the code you modified for netchicken, could you explain how exactly this piece of code works - particularly the calculations you perform.
I'm having trouble customizing this code for my scroll view. Thanks in advance

Sub View_Click
Dim Send As View
Dim row, Obj As Int
Send=Sender

row=Floor(Send.Tag/10) 'HERE!!
Obj=Send.Tag-row*10 ' HERE!!
Select Obj
Case 0
Activity.Title="view click Row = "&row&" Main Panel"
Case 1
Activity.Title="view click Row = "&row&" Product = "&Obj

Case 2,3,4,5
Activity.Title="view click Row = "&row&" Label = "&Obj
Case 6
Activity.Title="view click Row = "&row&" Image"
End Select
End Sub
 

klaus

Expert
Licensed User
Longtime User
I don't remember exactly what the DB content was, and I don't have the file anymore.
But from the two lines it seems that the Tag value was 10 * row + ObjIndex.
So row=Floor(Send.Tag/10), which means the integer value of Send.Tag/10,
and Obj=Send.Tag-row*10 the Obj index = Send.Tag - row*10 removes the row value wich is 10 * row value.
then we need to multiply the reminder by 10 to get the object index.

Best regards.
 
Top