I am going in circles trying to loop through properties on 3rd party
controls. For example, I have a textbox that has its maximum length located
at MyTextBox.Prope rties.MaxLength - instead of the dotnet textbox which is
MyTextBox.MaxLe ngth. If I loop a built in dotnet control, it finds the
property no problem. But looping through the 3rd party control,
Properties.MaxL ength does not get listed. I was hoping to find how it names
it using reflection, so I could use GetValue and SetValue to dyanmically set
values of controls without knowing their type until runtime. How can I gain
access to loop ALL the properties of a control?
Dim t As Type = ctl.GetType
For Each pp As PropertyInfo In t.GetProperties ()
Console.WriteLi ne("{0} = {1}", pp.Name, pp.GetValue(ctl , Nothing))
Next
controls. For example, I have a textbox that has its maximum length located
at MyTextBox.Prope rties.MaxLength - instead of the dotnet textbox which is
MyTextBox.MaxLe ngth. If I loop a built in dotnet control, it finds the
property no problem. But looping through the 3rd party control,
Properties.MaxL ength does not get listed. I was hoping to find how it names
it using reflection, so I could use GetValue and SetValue to dyanmically set
values of controls without knowing their type until runtime. How can I gain
access to loop ALL the properties of a control?
Dim t As Type = ctl.GetType
For Each pp As PropertyInfo In t.GetProperties ()
Console.WriteLi ne("{0} = {1}", pp.Name, pp.GetValue(ctl , Nothing))
Next
Comment