Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting Properties on Controls in Inherited Forms
Message
 
À
24/10/2003 12:20:24
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00842236
Message ID:
00842250
Vues:
17
>I'm new to .NET so forgive me if the answer is obvious. I created a base class form with several buttons on it that I want to use as a data entry form.
>
>When I add a new form inheriting from this form the button properties can’t be changed in the property window. Is this default Vb.Net behavior?
>
>Terry Carroll

If they are private then they won't be able to be changed, you want to make the public, but I would just create public properties to access them..
Inside the Base Form:
/* Declare this */
private System.Windows.Forms.Button m_myButton = new Button();

/* Then create this property */
public System.Windows.Forms.Button myButton
{
   get { return this.m_myButton; }
   set { this.m_myButton = value; }
}
That will allow you to modify it on the inherited forms.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform