ParentForm and ParentContainer
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



ParentForm and ParentContainerExpand / Collapse
Author
Message
Posted 04/02/2008 8:22:03 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 1:44:09 AM
Posts: 115, Visits: 344
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 ?

Post #15314
Posted 04/02/2008 9:15:26 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:54:01 AM
Posts: 4,104, Visits: 4,177
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.

Post #15319
Posted 04/03/2008 12:49:03 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 1:44:09 AM
Posts: 115, Visits: 344

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.
Post #15359
Posted 04/03/2008 9:04:49 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:54:01 AM
Posts: 4,104, Visits: 4,177
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.
Post #15363
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 7:14pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.