I can hide a Sliding Panel but not its Tab in AHviewPager

Mahares

Expert
Licensed User
Longtime User
I use AHviewPager to load 5 pages (pager). Each page has its own panel. I can hide a panel with: pnlX.visible=False, but its page (pager) does not hide. When I scroll or swipe left and right, the page displays blank even though its panel was hidden. To speed up the scrolling, I would like the scrolling to completely skip it instead of showing it blank. Can this be possible with AHviewPager?
Thank you
 
Last edited:

corwin42

Expert
Licensed User
Longtime User
You can only remove a page completely with AHPageContainer.DeletePage() and then you have to update the tabs with AHViewPagerTabs.NotifyDataChange. If you don't notify the tabs about the new page structure then it may crash.

If you keep a reference to your pnlX you can add this page later again with AHPageContainer.AddPageAt() at the old position.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Markus:
I am afraid that is what I thought what your response would be. There is always a risk in deleting and then recreating pages. In my case I may have 7 pages and 2 or 3 of them may not be needed temporarily as the data in them is not required, which will change the postion of the rest. Then the deleted ones may have to be reinstated almost immediately after that. I thought a HIDE option will make it a little safer to bounce back and forth.
I will weigh my options whether using tabhost where I can hide pages or sliding panels where I cannot.
Thank you very much
 
Upvote 0
Top