ParentForm and ParentContainer


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
One thing you may want to use is the BusinessObjects property on the form.  The form has a collection of BOs on it that are dropped on that particular form, so you may want to try that.  But you will not be able to set the ParentForm property...this is a readonly property that sets itself.  You could look into the ParentContainer property, as mentioned in the previous post, as well.
Ertan Deniz
Ertan Deniz
StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)
Group: Forum Members
Posts: 163, Visits: 493

I'm trying to get some business object usage information like Which forms use which objects for logging purposes.
If I know the parent object (especially the form), it will be logged with necesseary related information. After some time,
I will expect nearly to get some useful information for dependencies between forms and objects.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
We set this property in the actual Get of the ParentForm property itself.  I really don't understand what you are trying to accomplish here so I am not sure how to respond to this post.  Are you just wanting to know how we implement the ParentForm property so that you can emulate this on a control of your own?  If so, then just open up the source code and you can see what we are doing. 

If you are trying to use OUR ParentForm property and just wanting to set it in code, you will not really be able to do this since the logic is within the ParentForm property itself.  This is a readonly property that is self aware and if it has not been set it attempts to look at the ParentContainer for a class of the BaseForm type until it finds one (or doesn't find one).

You may be better off using the ParentContainer property since it can be set in code and it will accept any object that implements the IContainerControl interface.

Ertan Deniz
Ertan Deniz
StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)
Group: Forum Members
Posts: 163, Visits: 493
I want to use ParentForm property for the businessObjects that is initiated in the code (i.e not dropped on the form) 

Currently, This type of objects has null value for the property. I've seen the other constructor (with parameter Icontainer) was working. But I couldn't understand When these properties were set. I may follow the same way.

How can I achieve this ?

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