Container and Container Panel Items

The Container and ContainerPanel dialog items are used in conjunction with the Tree item to display detail for a Tree node. The detailPanelId field in the DItem_TreeRsc references the Id of a ContainerPanel. The containerId filed in the DItem_ContainerPanelRsc references the Id of a default Container to display in the ContainerPanel. The DITEM_MESSAGE_CREATE and DESTROY cases in a Container hook may be used to create and destroy structures or objects used by items in a Container.

Item Resource Specification

The Container item is defined in a resource file with the following structure:

typedef struct ditem_containerrsc
{
ULong commandNumber;
ULong commandSource;
ULong helpInfo;
ULong helpSource;
long itemHookId;
long itemHookArg;
ULong attributes;
long diListId; // DialogItemListRsc id
#if defined (resource)
resourceclass DItem_ContainerRsc RTYPE_Container extendedAttributes,
extendedIntAttributes, extendedWideAttributes;
#define Container RTYPE_Container
#endif

The ContainerPanel item is defined in a resource file with the following structure :

typedef struct ditem_containerpanelrsc
{
ULong helpInfo;
ULong helpSource;
long itemHookId;
long itemHookArg;
ULong attributes; // ContainerPanel attributes
long containerId; // ContainerRsc id
long toggleBtnId; // (Not implemented in V8)
#if defined (resource)
char label[]; // Label for bounding box
#else
long labelLength;
char label[1];
#endif
#if defined (resource)
extendedAttributes, extendedIntAttributes, extendedWideAttributes;
#define ContainerPanel RTYPE_ContainerPanel
#endif

The DItem_ContainerRsc structure has the following unique fields(see CommonItemResourceFields for a description of any field not in the table below) :

Field Description
attributes Specifies the attributes of the Container item. (There are no Container attributes defined at this time.)
diListId Specifies the Id of a DialogItemListRsc containing the list of dialog items to display for this Container.

The DItem_ContainerPanelRsc structure has the following unique fields (see CommonItemResourceFields for a description of any field not in the table below.):

Field Description
attributes Specifies the attributes of the ContainerPanel item. It is constructed by combining the constants from the attributes table (below) with the logical OR operator.
containerId Specifies the Id of the default Container to display. The mdlDialog_containerPanelSetInfo and mdlDialog_treeSetContainer functions may be used to set a new Container Id to display in the ContainerPanel.
toggleBtnId Specifies the Id of a ToggleButton to use. (This has not been implemented in MicroStation V8.)

The table below lists the ContainerPanel attributes:

Constant Description
CTPANELATTR_BOUNDINGBOX Indicates a bounding box should be drawn along the border rectangle of the Container Panel.

ContainerPanel functions

Funtion Description
mdlDialog_containerPanelGetInfo retrieves information about a container panel dialog item.
mdlDialog_containerPanelSetInfo sets information about a container panel dialog item.
mdlDialog_containerPanelItemAdded notifies the container panel dialog item that a new item was added to it.

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.