Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassing a TabControl
Message
De
12/11/2004 11:43:57
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00960845
Message ID:
00960891
Vues:
9
Stephane,

What you have just posted is just about right ... you don't need all that extra gobbledy-gook that you had in your first post. The only change I would make to what you have just posted is:
		public _EditBox()
		{
			this.Multiline = true;
		}
I took out the ": base()" ... it's not necessary here.

~~Bonnie



>What is the minimum code to subclass a control, it all look very confusing to me... Do i need to implement the Dispose() and the InitializeComponent methods ? or is this code would be just fine:
>
>
>using System;
>using System.Collections;
>using System.ComponentModel;
>using System.ComponentModel.Design;
>using System.Drawing;
>using System.Windows.Forms;
>
>
>namespace Test.GUI
>{
>	[ToolboxBitmap(typeof(TextBox))]
>	public class _EditBox : System.Windows.Forms.TextBox
>	{
>		public _EditBox() : base()
>		{
>			this.Multiline = true;
>		}
>	}
>}
>
>
>See, i'm looking to subclass all controls i will use, and probably add more functionallity later to them.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform