471,337 Members | 1,167 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Inheritance for a group of controls

Hello all

I am trying to create several controls (textbox, richtextbox,
combobox, etc.) with added functionality (example: change background
color on enter, return to normal on exit). All this functionality is
common to all of the controls, and I'd like a way to create it just
once, rather than once for each control.

To clarify, I have one control declared as follows:

public class DataEntryTextbox : System.Windows.Forms.TextBox
{
...
}

and another declared as:

public class DataEntryRichTextbox :
System.Windows.Forms.RichTextBox
{
...
}

They have precisely the same overrides and added functionality. I'd
like to be able to control these from one place and not have to worry
about changing them every place that I implement them.

Any ideas?

Thanks in advance!
Robert

Jul 21 '05 #1
0 863

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by KK | last post: by
14 posts views Thread by Steve Jorgensen | last post: by
1 post views Thread by Jason Hickey | last post: by
5 posts views Thread by Invalidlastname | last post: by
2 posts views Thread by Ray Cassick \(Home\) | last post: by
4 posts views Thread by Joe | last post: by
2 posts views Thread by David | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.