StrataFrame Forum

How to create my own template of a SF form?

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

By Edhy Rijo - 3/18/2008

Hi,

I have to create around 12-15 forms which will use the same layout and functionality.  These form will be basically use for maintaining several lookup data and other related information.

I don't want to be copying and pasting control on every form, so what is the .NET way to have my own own base form with the main controls to be use (a ListView and a couple of ThemeGroupBoxes?

In VFP I would simply create the base form and then save it as a class, so the rest will just inherit from this one.

Thanks!

By Trent L. Taylor - 3/19/2008

Create a user control.  You will want to create a StrataFrame user control and then drop on your BOs just as though it were a form, etc.  You will then add all of the controls and logic that you will use and bind to the BOs on the user control.

Then you can drop this user control on a form and use the BOTranslations property to translate the BOs on the form into the BOs on the user control.  You can then inherit the user control for downstream controls.

You can do this for a form as well.  It would be the same thing.  Create the form, add your logic, then create a form and inherit from the form with the logic that you want to inherit from.  Either way will work.