winforms - Scrollbar in UserControl in C# -
i have create usercontrol added in tabpage.
tabpage.autoscroll = true;
after launching application ,there vertical scrollbar. when resize application horizontally ther no scroll bar.
tabcontrol-> tabpage -> usercontrol
// tabpage // this.tab_resume_new.controls.add(this.usercontrolresume); this.tab_resume_new.location = new system.drawing.point(4, 29); this.tab_resume_new.name = "tabpage"; this.tab_resume_new.size = new system.drawing.size(1270, 635);
in usercontrol
// usercontrol // this.autoscaledimensions = new system.drawing.sizef(6f, 13f); this.autoscalemode = system.windows.forms.autoscalemode.font; this.autoscroll = true; this.controls.add(this.tablelayoutpanel8); this.name = "usercontrolresume"; this.size = new system.drawing.size(1260, 625)
there few things can go wrong in situation.
1) need put autoscroll on usercontrol
2) control on tablpage has anchor set right.. if have right horizontal scrollbar not shown.
3) have nested control , wrapper control in tabpage. wrapper control not exceeding tab page bounds.
Comments
Post a Comment