RE: Reading Object Properties in Code

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If we do have the Tag and text properties set for the text box, we can get
the properties by using the following piece of code

foreach (Binding bind in btnGetFileList.DataBindings)
{
string prpName = bind.PropertyName;
}

Hope the above helps.

Kannan

"NormD" wrote:

We've done programming that will go through a form and read properties of
objects on the form. But it doesn't work for all properties. For example,
for a TextBox (System.Windows.Forms.TextBox) there is an expandable property
for DataBindings. It has properties under it, Advanced, Tag, and Text. We
can't read these properties.

I can't believe all the properties of objects can't be accessed by code!
Any suggestions?
.



Relevant Pages