I would like to create panels with detailed information regarding an item (including a thumbnail image on the left hand side) and then add these to a scrollable list. Much like how iTunes on the iPhone displays the lists of applications available.
I have done some searching but have thus far been unable to find any assistance.
Does anyone have any ideas or links to samples they would like to share with me.
Thanks in advance,
Rob
In sum, the following creates a series of panels within a container that scroll in and out of view using a vertical scroll bar.
You did not list ASP.NET in your tags, so I assume this is Windows form-based, not web based. I’ll get you started:
GrandChildPanel. Inside it, put an image box on the left side and labels with the information you want to display next to the image. This panel will be duplicated for every item (i.e., iTunes song).ChildPanel.ParentPaneland set its width to the size of the other panels plus enough room for a vertical scroll bar. Set the height equal to however tall you want the scrollable area to be.ChildPanelin the top-right corner ofParentPaneland add a vertical scroll bar to the far right edge ofParentPanel. Set the scroll bar’s height to takeup the entire height ofParentPanel.ParentPanelto show its boundaries.GrandChildPanelto show where the panel ends.That’s the setup. Here are the requirements for your code: Each time you ‘add an item to the list’ (e.g., every song in your iTunes list), you do the following:
GrandChildPanel.ChildPanel.Topto be equal to the previous clone’sTopplus itsHeight.ChildPanel‘sHeightequal to any givenGrandChildPanel‘s height multiplied by the number of clones.ChildPanel‘s height.Now, all you have to do to make this scrollable is perform the following on the scrolling or changing events of the vertical scroll bar: Set
ChildPanel‘sTopto be equal to the verticle scroll bar’s value (“position”) multiplied by-1.