0

Lets say in Designer I add a ScrollView to the activity, then I add a Panel with a height that is 2 or 3 time greater than the ScrollView. Next, I place views (EditText, buttons, etc.) into the panel. Now I have a large panel full of controls. I want to be able to scroll the panel which is in the same activity as the ScrollView.

So far I have not been able to scroll the panel using my finger. But I am able to scroll a panel if I load a layout. I'm hoping to not have to rely upon a separate layout for the ScrollView if its possible to use a panel from the same activity.

So my question is this: Is it only possible to scroll a loaded layout? or is it also possible to scroll a panel from the same activity?

Thank you for your help or suggestions

Bob G
  • 23
  • 2
  • 6
  • Okay, I've learned how to scroll a panel full of views using the ScrollView without having to rely upon a separate layout file but it seems that the only way I can do so is programatically. I have not figured if there is a way to create a panel in Designer along with a scrollView so that they are both in the same layout file. – Bob G Nov 02 '11 at 05:26

1 Answers1

0

You have two options. You can use a separate layout file for the inner panel or you can create a panel in the same layout file and then call:

Panel1.RemoveView 'Removes the panel from the Activity
ScrollView1.Panel.AddView(Panel1, 0, 0, ScrollView1.Width, ScrollView1.Panel.Height)
Erel
  • 1,802
  • 2
  • 15
  • 58