Listing form controls with binding and tooltip etc


Author
Message
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Is there already a good utility or tool (or chunk of code I could steal ) that would allow for listing all the controls on a form, their databinding, type, tooltip (not a biggie)



I was thinking of extracting it from form's code itself, but I thought someone may have already done this and written code to do so??



( actually, this could be done with LINQ against the text of the form designer file ... hmmm ) Cool
Paul Chase
Paul Chase
Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
If you are only concerned with Strataframe bound controls you could just loop through the forms business object collection and then loop through each BO's bound controls collection. Otherwise you would have to loop though the controls collection of the form and recurse through each control's control collection etc.

Here is a basic version of getting just the bound controls

Console.WriteLine("Only Bound Controls")

For Each LoBusobj As MicroFour.StrataFrame.Business.BusinessLayer In Me.BusinessObjects

For Each locontrol As System.Windows.Forms.Control In LoBusobj.BoundControls

Console.WriteLine("Control Name " & locontrol.Name)

Console.WriteLine("Binding Fld " & CType(locontrol, MicroFour.StrataFrame.UI.Windows.Forms.IBusinessBindable).BindingField)

Next

Next


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search