0

I want to switch between several Pages with "Swipe-Left" and "Swipe-Right" Buttons, like shown on the Image.

I attached an example image -> CLICK ME

The Content of the Red Box should be changed only with the Arrow-Buttons. The other Content doesn't change.

My idea was: Maybe I could add a PanelLayout to the MainWindow and always add new Content to that Panel. But that seems not really professional to me. The pages should have a index (if possible)

Is there any other Solution?

Toberto
  • 139
  • 1
  • 10
  • I recommend a TableLayoutPanel, with multiple panels in the middle, setting them to visible true/false when clicked. But there is probably a cleaner way. – Sasha Jan 22 '18 at 12:02
  • I tried the following way, it works, but like you say - there must be a cleaner way: – Toberto Jan 22 '18 at 12:27
  • Public Tab0 As formTab0 Tab0.TopLevel = False mainform.MainPanel.Controls.Add(Tab0) and then with the Buttons: Tab0.show() and at the same time TabX.hide() – Toberto Jan 22 '18 at 12:28
  • 1
    Just use a `TabControl` and hide the tabs. Here's a C# solution, easily convertible to VB.NET: https://stackoverflow.com/a/6954785 – Visual Vincent Jan 22 '18 at 12:31
  • Thx for your Tip Vincent, but I'm specifically looking for a Layout without TabLayout and/or TabControl. I have guidelines which I have to follow. I always work and like TabLayouts, but in this case I'm not allowed to use it. – Toberto Jan 22 '18 at 12:43
  • Then your initial solution seems to be what you need, but rather than forms you should use panels or user controls (unless you need to use each as a window, that is). Put them in a list or array to have them indexed. – Visual Vincent Jan 22 '18 at 13:04

0 Answers0