I have added a scroll bar programmatically to a panel in my form, however when i run the application the scroll bar doesn't do anything.
How do I get it to scroll up and down the panel?
Much appreciated.
pnlGantt.Visible = true;
ScrollBar vScrollBar1 = new VScrollBar();
vScrollBar1.Dock = DockStyle.Right;
vScrollBar1.Scroll += (sender, e) => { pnlGantt.VerticalScroll.Value = vScrollBar1.Value; };
pnlGantt.Controls.Add(vScrollBar1);
Panel: