cancel
Showing results for 
Search instead for 
Did you mean: 

swipeContainer which turns around (page 1,2,3,1,..) I want to have a swipe container with 3 pages where the first page is selected if the last is swiped. Is there an easier way than proposed below?

awiernie
Senior II

I could derive a new container from the swipeContainer, but different from older touchGFX the swipeContainer is now a member of the generated ViewBase.

I would try to solve it like described below, but is there an easier way?

Proposed solution:

Inherit MySwipeContainer from SwipeContainer

At Runtime remove the SwipeContainer from the View

Add the MySwipeContainer to the View (at runtime)

3 REPLIES 3
awiernie
Senior II

Additional information why I need this.

I want to scroll via a swipeContainer through an infinite number of datasets. My idea was to have 3 pages in the swipe Container where the left container contains the previous dataset, the current container contains the current dataset and the right container contains the next dataset. If the user swipes to the right, the dataset is already there and the new next dataset is loaded and put into the more right container (or the first if the end is reached).

Hi

An alternative is to use a Scroll List or Scroll Wheel, which allows you to scroll between dataset, in a circular set up, but requires use code to update what is shown on the screen.

Otherwise you do not have to add a SwipeContainer in the designer, you can simply create the containers and add the to MySwipeContainer  add Run time.

/Emil

Actually, I am using the old version of the swipe container which was included in the demo of an older version of touchGfx and which is not integrated into the base class but in the derived. This was a little bit complex to understand but is seems to be at least as usefull for my purpose. I thought with the new widget less programming is needed but there seems not to be much difference now.