Klaus,
I am going to have to take you up on your offer, here is a cut down version of the code. When you press the buttons at the bottom, the scroll view doesn't get longer or shorter. In this first instance you should see 5 name buttons, but there are actually 10 drawn in the loop. What am I missing?
Sub Globals
Dim sPanel As Panel
Dim sView As ScrollView
Dim ArrayOfButtons(4, 10) As Button
Dim aButton As Button
Dim sButton As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
sView.Initialize(0)
Activity.AddView(sView, 0, 72dip, 100%x, Activity.Height - 144dip)
sPanel.Initialize("sPanel")
sPanel = sView.Panel
sView.Panel.Height = 360dip
For row = 0 To 9
Dim nameButton As Button
nameButton.Initialize("Button")
nameButton.Text = "Player " & (row + 1)
nameButton.Tag = "n" & row
sView.Panel.AddView(nameButton, 72dip, 72dip*row, Activity.Width - 218dip, 70dip)
ArrayOfButtons(0, row) = nameButton
Next
aButton.Initialize("aButton")
sButton.Initialize("sButton")
aButton.Text = "Add"
sButton.Text = "Remove"
Activity.AddView(aButton, ((((Activity.Width / 3) * 1) - (Activity.Width / 3) / 2)) - 45, Activity.Height - 70dip, 90dip, 70dip)
Activity.AddView(sButton, ((((Activity.Width / 3) * 2) - (Activity.Width / 3) / 2)) - 45, Activity.Height - 70dip, 90dip, 70dip)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub aButton_Click
sView.Panel.Height = sView.Panel.Height + 72dip
End Sub
Sub sButton_Click
sView.Panel.Height = sView.Panel.Height - 72dip
End Sub