How to add scrollbars in WinForms MetroForm?
Adding scrollbars in MetroForm
By default, WinForms MetroForm don’t have any scroll bar. But we can add scroll bar in MetroForm by the help of Panel. Here we have used the ScrollersFrame in Panel to show the scroll bar and apply the metro style. The following code demonstrates the same.
C#
//Initialize ScrollersFrame ScrollersFrame frame = new ScrollersFrame(); //Enable ScrollBar to the container frame.AttachedTo = this.panel1; //Set ScrollersFrame Visual Style frame.VisualStyle = ScrollBarCustomDrawStyles.Metro; //Enable AutoScroll property this.panel1.AutoScroll = true;
VB
'Initialize ScrollersFrame Dim frame As New ScrollersFrame() 'Enable ScrollBar to the container frame.AttachedTo = Me.panel1 'Set ScrollersFrame Visual Style frame.VisualStyle = ScrollBarCustomDrawStyles.Metro 'Enable AutoScroll property Me.panel1.AutoScroll = True
Screenshot
Samples:
Conclusion
I hope you enjoyed learning how to to add scrollbars in WinForms MetroForm.
Refer to our WinForms MetroForm’s feature tour page for its other groundbreaking feature representations. You can also explore our WinForms MetroForm documentation to understand how to present and manipulate data.
For current customers, check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, try our 30-day free trial to check out our WinForms MetroForm and other WinForms components.
Please let us know in the following comment section if you have any queries or require clarifications. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!