Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List all the .Text properties of all controls of an asse
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00930366
Message ID:
00930618
Vues:
14
Are you sure I will find menus and tooltips using GetProperties on this.Controls (since these are Components and not Controls) ?


>Eric,
>
>Once you have the form reference if you want to check to see if a control has the properties you are interested in you can build an array of properties using the types GetProperties() member. There are corresponding Type members for fields, constructors, methods and events.
>
>Type ObjectType;
>			
>foreach (object objObject in this.Controls)
>{
>   ObjectType = objObject.GetType();
>   PropertyInfo[] ObjectProps = ObjectType.GetProperties(BindingFlags.Public | BindingFlags.Instance);
>
>   foreach(PropertyInfo PropInfo in ObjectProps)
>   {
>      lstProperties.Items.Add(PropInfo.Name);
>   }
>}
>
>Regards
>Neil
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform