E
eBob.com
I have an app which uses a RichTextBox. But now I'd like to associate some
data with the RTB. I know I could use the Tag property, but I'd much rather
create a new class which inherits from RTB and add a few fields to it. My
first problem is what do I want to add to the project? A "Component" or a
"UserControl" or a "Class"? And then all of those choices make me select a
template and I have no idea which template to use.
When I tried to do what seemed most logical to me (I think I was adding a
UserControl) I get an error message "Base Class
'System.Windows.Forms.RichTextBox' specified for class 'RTBx' cannot be
different from the base class '...UserControl' or one of its other partial
types."
Also, no matter what I have tried I do not see my "thing" (i.e. Component,
UserControl, whatever) in the Toolbox and therefore cannot drag and drop it
onto my Form1 in the designer.
Can anyone please give me some guidance on this?
Thanks, Bob
data with the RTB. I know I could use the Tag property, but I'd much rather
create a new class which inherits from RTB and add a few fields to it. My
first problem is what do I want to add to the project? A "Component" or a
"UserControl" or a "Class"? And then all of those choices make me select a
template and I have no idea which template to use.
When I tried to do what seemed most logical to me (I think I was adding a
UserControl) I get an error message "Base Class
'System.Windows.Forms.RichTextBox' specified for class 'RTBx' cannot be
different from the base class '...UserControl' or one of its other partial
types."
Also, no matter what I have tried I do not see my "thing" (i.e. Component,
UserControl, whatever) in the Toolbox and therefore cannot drag and drop it
onto my Form1 in the designer.
Can anyone please give me some guidance on this?
Thanks, Bob