Looping panels in ScrollView and setting innerwidth

WZSun

Member
Licensed User
Longtime User
Hi, I have 2 questions on ScrollView and need your advice...

a) Is there a way to loop a scrollview?
For example, I have a 2 panels in a scroll view, say "PANEL 1 | PANEL 2". Is there a way where when PANEL 2 is displayed, the PANEL 1 is attached to the right such that it becomes likes this:
PANEL 1 | PANEL 2| PANEL 1 | PANEL 2 ...

b) There is a "Horizontal ScrollView properties' that define the inner width of the scroll.
i) How do I define the width from my code?
ii) I noticed the width varies between different devices. Is there a way to dynamically assign the width such that the width is similar on all devices.

Thanks for the help in advance..

WZSun
 

WZSun

Member
Licensed User
Longtime User
Hi,
I managed to find the solution to my 2nd question of defining variable width

example:
HScrollView1.Panel.Width = panel1.Width * 4

As the width of each panel 'differs' between devices, setting a fixed width may not looks great on diff devices. In above example, I have 4 panels attached next to one another. With above code, I could set the inner width of the Horizontal ScrollView dynamically...

Anyone can advise on the 1st question - looping the panels in a ScrollView?

Any help is appreciated. Thanks

WZSun
 
Upvote 0

WZSun

Member
Licensed User
Longtime User
Hi Erel,
Thanks. I've tested the sliding panel before but it does not allows scrolling of the long panel to any position, unlike the flexibility of ScrollView which works great.

Imagine Panel1 containing 31 subpanels representing the Day of a month. User can scroll the Panel1, and when subPanelDay31 is displayed on the right side of the device screen, user will continue to see subPanelDay1 again right next to subPanelDay31. And it's like a horizontal spinning panels much like the Date/Time spinners...

Rgds
Ronnie
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…