Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List all the .Text properties of all controls of an asse
Message
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00930366
Message ID:
00930618
Views:
12
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform