B4A Library A Quickaction and scrollview

I want to use the Quick action library in a scrollview to show a horizontal menu selection.

How do I get the correct view and position to show it in the right place?
 

hbruno

Member
Licensed User
Longtime User
You can add a panel for each line in your scrollview and attach the Quickaction to these panel, like this :

B4X:
   Dim SV As ScrollView
   Dim QuickAction As AHQuickAction

   For ligne = 0 To List1.Size - 1
      Dim Lab1, Lab2 As Label
      Lab1.Initialize("") : Lab2.Initialize("")
         |
       bla bla bla
         |
      Dim Pan As Panel
      Pan.Initialize("")
      Pan.AddView(Lab1, 15dip,  5dip, 250dip, 20dip)
      Pan.AddView(Lab2, 15dip, 28dip, 250dip, 20dip)
      SV.Panel.AddView(Pan, 0, 60dip * ligne, SV.Width - 12, 56dip)
   Next
   SV.Panel.Height = List1.Size * 60dip

Sub Pan_Click
   Dim Panneau As Panel
   Panneau = Sender
   QuickAction.show(Panneau)
   Index_Item = Panneau.Tag
End Sub
 
Top