The Tabbed Child Container (TTabChildContainer) object is a very powerful way to integrate child items onto the pricing form of their parent.

Child items are commonly used for these cases:

  • To include separately produced items that are related to the parent product.
  • To independently price items that are included in the parent product.
  • To allow an unlimited number of an item to be included within the parent product.

While all of these have tangible design benefits, all of these subtract from the “user” experience by forcing the user to deal with this artificial separation. The Tabbed Child Container was created to overcome this obstacle.

**Note: To design your own forms you must own the Customizable version of Control. While the OOB version can use all of these features, it contains no designer capability to create your own forms.**

The easiest way (in my opinion) to understand the power of the Tabbed Child Container is to see how it works. The Composition Sign product was the first product in the standard OOB dataset to take advantage of this design.

In this pricing form, the red box indicates the section that is the tabbed child container. The blue box represents the toolbar and tab controls added. What is displayed within this container, is a pricing form for the child item that is being displayed. That pricing form (as evidenced by double-clicking on the child item directly within the order), would look like this in the above example:

Now that you see how it can look, let's discuss how to build it.

In order to use a tabbed child container, you will need to do the following:

  1. Create the parent pricing form and place a TTabChildContainer on it and set the following properties:
    • ChildTag - This value is used to determine all of the valid child items to display. The text entered here, normally something like PricingFormLink.CompositionChild is searched for in the Tags property of all products. (You can set the tags on the advanced tab of the product setup.) If it is found, it assumes that that product is a valid child product for that container.
    • DefaultForm - This is the default pricing form to display within the tabbed container. The actual pricing form used can be overridden by .
    • HomeForm - Set this to the pricing form to display as the “home” tab if desired. This pricing form usually has explanatory information and may have “child item” buttons that create child items as an alternative to the menu bar.
    • HomeFormCaption - Use this to set the name of the home tab.
    • HomeFormPosition - Use this to set if the home tab is displayed first among tabs, last among tabs, or only when no child item tab is included.
    • TabLabelPrefix - The tab for each child item can be set to display the Line Item Number, the Child Index Letter, the Child Index Number, or nothing. The Child Index information is used when grouping different types of child items, whereas the Line Item Number is usually used when all child items are the same type.
    • ToolbarOptions.AddButtonCaption - Use this option if you want to override the name of the “Add” button to say something like “Add Component”.
    • ToolbarOptions.Position - This determines where the tabs appear. The options are Top, Bottom, or Hidden.
    • ToolbarOptions.ShowAdd - Set this to True if you want the button to add child items to be visible.
    • ToolbarOptions.ShowClone - Set this to True if you want the button to clone child pieces to be visible.
    • ToolbarOptions.ShowDelete - Set this to True if you want the button to delete child pieces to be visible.
    • ToolbarOptions.ShowMove - Set this to True if you want the “Move Up” and “Move Down” buttons used to rearrange the order of child items to be visible.
  2. Create the child item pricing form. This is just a regular, though probably smaller, version of the normal pricing form for that item.
  3. Edit each product that can be a child of this container and add the tag you referenced above (normally something like PricingFormLink.CompositionChild ).

Contributor: Cyrious Software

Date: 01/2010

Version: Control 4.3+

Chris, 2020/03/17 14:31

The DefaultForm can be overwritten by setting the following tag on the linked child product: PricingFormLink.CompositeChild=<form name>

You could leave a comment if you were logged in.