See Also: Class Meta-Data Tags
The CompositeClass setting is used to connect two or more classes that are conceptually bound together in operations. For example, it is used to assign a tab page class to a tab dialog class, and by Studio designers to determine which class to use when placing tab page objects inside tab dialog objects.
{ CompositeClass={CompositeClassName} }
where {CompositeClassName} is the name of the associated composite class.
CompositeClass is used to assign a child object class to a parent container object class. This is used by the Studio's Visual Designer whenever creating certain composite classes, made up of a parent container object with child objects inside that parent object.
For example, if a new TabDialog sub-class is created and you want that class to use a new TabPage class, you would set the class name using CompositeClass. When the Studio creates new tab pages objects, it will use this new class.
Classes using the CompositeClass tag
Parent Container Class |
Child Object Class |
cCJGrid |
cCJGridColumn |
cScrollingContainer |
cScrollingClientArea |
cSplitterContainer |
cSplitterContainerChild, cSplitterContainerChild |
cDbCJGrid |
cDbCJGridColumn |
cDbScrollingContainer |
cDbScrollingClientArea |
cDbSplitterContainer |
cDbSplitterContainerChild, cDbSplitterContainerChild |
dbTabDialog |
dbTabPage |
dbTabDialogView |
dbTabView |
TabDialog |
TabPage |
If a developer creates custom tab dialog and tab page classes, named cMyTabDialog and cMyTabPage, respectively, and wants the Studio to use objects of class cMyTabPage whenever adding tab pages to objects of class cMyTabDialog, the developer can place the CompositeClass meta-data tag above the class declaration line and set it to cMyTabPage.
{ CompositeClass=cMyTabPage }
Class cMyTabDialog is a cTabDialog
End_Class
CompositeClass is also used by the CodeJock grid classes to determine which grid column class to use when dragging columns from DDO Explorer onto the grid in the Visual Designer.
{ CompositeClass=cMyGridColumn }
Class cMyGrid is a cDbCJGrid
End_Class
This would ensure that when columns are dropped onto a cMyGrid object in the Visual Designer then the class used to create the columns would be the cMyGridColumn class.
The CompositeClass class meta-data tag is inherited. If a superclass is assigned a particular composite class, any subclasses of that class will use the same composite class.