Erel,
I have slightly modified your code to allow for what i thought would be 2 panels side by side to accomplish horizontal scrolling but it does not seem to have made any difference to the way your original code works.
I eventualy want to put a series of 4 panels above and 4 panels below with an imageview on them containing jpg's.
Could you have a look at the simple adaptations i have made and tell me why it does not work?
Many Thanks
Joe
Dim panels(8) As Panel
For i = 0 To panels.Length - 1 Step 2
panels(i).Initialize("panels")
panels(i).Color = Colors.RGB(Rnd(0, 255), Rnd(0, 255), Rnd(0, 255))
panels(i+1).Initialize("panels")
panels(i+1).Color = Colors.RGB(Rnd(0, 255), Rnd(0, 255), Rnd(0, 255))
Dim lbl As Label
lbl.Initialize("")
lbl.Text = "I'm Panel: " & i
lbl.TextSize = 20
lbl.TextColor = Colors.White
panels(i).AddView(lbl, 20%x, 40%y, 60%x, 30dip)
Activity.AddView(panels(i), 0, 0, 50%x, 100%y) 'add the panel to the layout
Activity.AddMenuItem("Panel #" & i, "Menu")
Dim lbl As Label
Pos2=panels(i).Width
lbl.Initialize("")
lbl.Text = "I'm Panel: " & (i+1)
lbl.TextSize = 20
lbl.TextColor = Colors.White
Activity.AddView(panels(i+1), Pos2, 0, 50%x, 100%y) 'add the 2nd panel to the layout
Activity.AddMenuItem("Panel #" & (i+1), "Menu")
Next
'add the Left and Right button
btnLeft.Initialize("Left")
btnLeft.Text = "Left"
activity.AddView(btnLeft, 10%x, 100%y - 55dip, 100dip, 50dip)
btnRight.Initialize("Right")
btnRight.Text = "Right"
activity.AddView(btnRight, 60%x, 100%y - 55dip, 100dip, 50dip)
'*****************************
'Initialize the SlidingData object and set the array of panels.
'Then we call SlidingPanels.Initialize to prepare the animation objects.
'The last call to ChangePanel brings the first panel.
sd.Initialize
sd.Panels = panels
SlidingPanels.Initialize(sd, SlidingDuration)
ChangePanel(True) 'Current code expects the first call to be with Left = True.