StrataFrame Forum

Trying to drop UltraList on a SF Theme Window but get an error saying I need a IContainerControl...

http://forum.strataframe.net/Topic9907.aspx

By Robert Carl Johnson - 7/2/2007

Hi all. Is the IContainerControl an actual control or what? I don't find such a control in my tool box. I see references to the SF user control in the docs and in messages in the fourm but when I drop it on my form it also asks for the IContainerContainer control. Hmmm.... So, could someone explain this to me clearly please?



TIA



Regards,



Robert
By Robin J Giltner - 7/3/2007

I believe the IContainerControl is an interface, that according to the ObjectBrowser

"Provides the functionality for a control to act as a parent for other controls."  So it looks like the Ultragrid is making sure that the control it is being dropped on, is implementing the IContainerControl?

Are you trying to simply drop the UltraList onto an SF Themed Form?

Robin Giltner

By Robert Carl Johnson - 7/3/2007

Thanks for the reply Robin. Yes it is a Themed Form, but I'm still not sure how to impliment IContainerControl. Is there a SF sample that uses this mysterious control that I could look at to see how to use it and where it comes from?



Regards,



Robert
By StrataFrame Team - 7/3/2007

Ah, there might be some confusion there, because there is a System.Windows.Forms.IContainerControl and there is a MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.  The one you're probably wanting is the MicroFour one.  That interface is implemented by classes like MicroFour.StrataFrame.UI.Windows.Forms.BaseForm, and MicroFour.StrataFrame.UI.Windows.Forms.UserControl.  It ties together the binding between the business objects and the controls and initializes all of the objects that implement the IInitOnFormLoad interface.  Now that interface is not implemented on ThemedForm because ThemedForm is meant to be an accent form, more as a base for the WaitWindow and MessageForm than as a form for your application.  If you want to use the ThemedForm as the base for one or more of the forms in your application, you'll need to subclass it and implement that interface on it.  You can see how to implement it by checking the source code for BaseForm... it's pretty extensive, so you might just copy it over if you need to.
By Robert Carl Johnson - 7/3/2007

Thank you Ben. I understand what is going on now. I'll check out the reference you gave me.



Regards,



Robert