-
December 13th, 2010, 02:24 PM
#1
How to give a new control scrollbars
I would like to create a new control, similar to the datagrid.
From what I have read, to give it scrollbars it needs to inherite from ScrollableControl
However, I also want to inherate from UserControl, and cSharp will not allow you to inherite from multiple base classes
public partial class MyControl : UserControl, ScrollableControl
Error 1 Class 'MyApplication.MyControl' cannot have multiple base classes: 'System.Windows.Forms.UserControl' and 'ScrollableControl'
Any ideas on how I can go about this?
Thanks
-
December 13th, 2010, 02:36 PM
#2
Re: How to give a new control scrollbars
A UserControl is a collection of controls. Create your control that derives from ScrollableControl and then add it to a UserControl.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|