DANIEL NGAHU
DANIEL NGAHU

Reputation: 51

adding a vertical scrollbar for a WinForm panel

I am designing a touch optimized WinForm application. The problem is: how to add a custom VScrollBar that I can affect its width?

This is my VScrollBar code

    panel1.VerticalScroll.Value = vScrollBar1.Value;

The problem is that it is not scrolling the panel to the end.

Upvotes: 3

Views: 4448

Answers (1)

whoismaikl
whoismaikl

Reputation: 314

You can add a FlowLayoutPanel and set the following property to that:

 flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
 flowLayoutPanel1.WrapContents = false;
 flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
 flowLayoutPanel1.AutoScroll = true;

and you can see the scroll, you can use the Panels and design your application.

Taken from:

How to make Winform scrollable in C#

Upvotes: 1

Related Questions