Functions
ComboBox Item

Functions

StatusInt mdlDialog_comboBoxGetInfo (CommandNumber *commandNumberP, UInt32 *commandSourceP, int *maxSizeP, WChar *formatToDisplayP, WChar *formatToInternalP, WChar *minimumP, WChar *maximumP, UInt32 *maskP, UShort *nRowsP, UShort *gapWidthP, UShort *listWidthP, UInt32 *attributesP, RawItemHdr *comboBP)
 Retrieves attributes of a ComboBox item. More...
 
StatusInt mdlDialog_comboBoxSetInfo (CommandNumber *commandNumberP, UInt32 *commandSourceP, int *maxSizeP, WCharCP formatToDisplayP, WCharCP formatToInternalP, WCharCP minimumP, WCharCP maximumP, UInt32 *maskP, UShort *nRowsP, UShort *gapWidthP, UShort *listWidthP, UInt32 *attributesP, bool redraw, RawItemHdr *comboBP)
 Sets attributes of a ComboBox item. More...
 
StringListP mdlDialog_comboBoxGetStrListP (RawItemHdr *comboBP)
 Retrieves a pointer to the StringList used by the ComboBox. More...
 
RawItemHdrmdlDialog_comboBoxGetTextP (RawItemHdr *comboBP)
 Returns a RawItemHdr pointer of the Text item attached to the ComboBox item. More...
 
RawItemHdrmdlDialog_comboBoxGetListBoxP (RawItemHdr *comboBP)
 Returns a RawItemHdr pointer of the ListBox attached to the ComboBox item. More...
 
RawItemHdrmdlDialog_comboBoxGetTreeP (RawItemHdr *comboBP)
 Returns a RawItemHdr pointer of the Tree attached to the ComboBox item. More...
 
ErrorCode mdlDialog_comboBoxSetStrListP (RawItemHdr *comboBP, StringListP strListP, int nColumns)
 Sets the StringList used by a ComboBox item. More...
 
StatusInt mdlDialog_comboBoxSetPopupState (RawItemHdr *comboBP, bool bOpen)
 Opens or closes the popup ListBox. More...
 
StatusInt mdlDialog_comboBoxGetAdditionalInfo (UShort *valueColIndexP, long *stringListIdP, RawItemHdr *comboBP)
 Gets information about a ComboBox dialog item in addition to what is returned by the mdlDialog_comboBoxGetInfo function. More...
 
StatusInt mdlDialog_comboBoxSetAdditionalInfo (UShort *valueColIndexP, long *stringListIdP, RawItemHdr *comboBP)
 Sets information about a ComboBox dialog item that cannot be set with the mdlDialog_comboBoxSetInfo function. More...
 
ListModel * mdlDialog_comboBoxGetListModelP (RawItemHdr *comboBP)
 Retrieves a pointer to the ListModel used by the ComboBox. More...
 
ErrorCode mdlDialog_comboBoxSetListModelP (RawItemHdr *comboBP, ListModel *pListModel)
 Sets the ListModel pointer used by the the ComboBox. More...
 
GuiTreeModelP mdlDialog_comboBoxGetTreeModelP (RawItemHdr *comboBP)
 Retrieves a pointer to the GuiTreeModel used by the ComboBox. More...
 
ErrorCode mdlDialog_comboBoxSetTreeModelP (RawItemHdr *comboBP, GuiTreeModelP pTreeModel)
 Sets the GuiTreeModel pointer used by the the ComboBox. More...
 
StatusInt mdlDialog_comboBoxGetIndex (long *indexP, RawItemHdr *comboBP)
 Gets the index of the specified ComboBox dialog item. More...
 
StatusInt mdlDialog_comboBoxSetIndex (long index, RawItemHdr *comboBP)
 Sets the index of the specified comboBox dialog item. More...
 
StatusInt mdlDialog_comboBoxSetSubEditor (RawItemHdr *comboBP, bool bSubEditor, RawItemHdr *ownerRiP)
 Notifies the ComboBox item of its SubEditor status. More...
 

Detailed Description

Function Documentation

StatusInt mdlDialog_comboBoxGetAdditionalInfo ( UShort valueColIndexP,
long *  stringListIdP,
RawItemHdr comboBP 
)

Gets information about a ComboBox dialog item in addition to what is returned by the mdlDialog_comboBoxGetInfo function.

Parameters
[out]valueColIndexPis the index of the value column. Pass NULL in this argument if you do not want this value returned by the function.
[out]stringListIdPis the StringList of values for the ComboBox. Pass NULL in this argument if you do not want this value returned by the function.
[in]comboBPComboBox to get additional info for
Returns
SUCCESS, or a non-zero value if an error occurs.
See also
mdlDialog_comboBoxSetAdditionalInfo
StatusInt mdlDialog_comboBoxGetIndex ( long *  indexP,
RawItemHdr comboBP 
)

Gets the index of the specified ComboBox dialog item.

Parameters
[out]indexPspecifies the index of the comboBox item.
[in]comboBPpoints to the comboBox dialog item to get the index from.
Returns
SUCCESS, or a non-zero value if an error occurs.
See also
mdlDialog_comboBoxSetIndex
StatusInt mdlDialog_comboBoxGetInfo ( CommandNumber *  commandNumberP,
UInt32 commandSourceP,
int *  maxSizeP,
WChar *  formatToDisplayP,
WChar *  formatToInternalP,
WChar *  minimumP,
WChar *  maximumP,
UInt32 maskP,
UShort nRowsP,
UShort gapWidthP,
UShort listWidthP,
UInt32 attributesP,
RawItemHdr comboBP 
)

Retrieves attributes of a ComboBox item.

For all of the pointer parameters, NULL indicates that the field is not desired.

Parameters
[out]commandNumberPset NULL if don't want cmd number
[out]commandSourcePset NULL if don't want cmd source
[out]maxSizePpoints to a variable that indicates the maximum allowable size of the text string that can be contained by the ComboBox item, the maximum is 32K characters.
[out]formatToDisplayPpoints to a sprintf format string to convert the value of the variable associated with the ComboBox item into a displayable string.
[out]formatToInternalPpoints to a sscanf format string to convert from the ComboBox item's string value to the format expected by the variable associated with the ComboBox item.
[out]minimumPpoints to a string that contains the minimum value of the ComboBox item.
[out]maximumPpoints to a string that contains the maximum value of the ComboBox item.
[out]maskPpoints to a UInt32 that contains the value mask
[out]nRowsPpoints to an int that contains the number of rows displayed when the proper ListBox appears.
[out]gapWidthPpoints to an int that contains the width, in dialog coordinate units (dcoords), between the selection field and the popup list activation button.
[out]listWidthPpoints to an int that contains the width, in dialog coordinate units (dcoords), of the popup ListBox.
[out]attributesPpoints to an int that contains the ComboBox item's attributes. The bits that can be included are defined in dlogbox.r.h.
[in]comboBPComboBox item to get info on
Returns
SUCCESS, or a non-zero value upon encountering an error.
RawItemHdr* mdlDialog_comboBoxGetListBoxP ( RawItemHdr comboBP)

Returns a RawItemHdr pointer of the ListBox attached to the ComboBox item.

Parameters
[in]comboBPComboBox to get ListBox RawItemHdr from
Returns
A pointer to the RawItemHdr of the ListBox, or NULL if an error occurs
ListModel* mdlDialog_comboBoxGetListModelP ( RawItemHdr comboBP)

Retrieves a pointer to the ListModel used by the ComboBox.

Parameters
[in]comboBPComboBox item to get list model from
Returns
A pointer to the ListModel, or NULL if an error occurs.
See also
mdlDialog_comboBoxSetListModelP
StringListP mdlDialog_comboBoxGetStrListP ( RawItemHdr comboBP)

Retrieves a pointer to the StringList used by the ComboBox.

Parameters
[in]comboBPComboBox to get strListP of.
Returns
A pointer to a StringList, or NULL if using a ListModel or the ComboBox item's StringList could not be retrieved. Usually, this implies that comboBP is invalid.
RawItemHdr* mdlDialog_comboBoxGetTextP ( RawItemHdr comboBP)

Returns a RawItemHdr pointer of the Text item attached to the ComboBox item.

Parameters
[in]comboBPComboBox to get Text item RawItemHdr from
Returns
A pointer to the RawItemHdr of the Text item, or NULL if an error occurs
GuiTreeModelP mdlDialog_comboBoxGetTreeModelP ( RawItemHdr comboBP)

Retrieves a pointer to the GuiTreeModel used by the ComboBox.

Parameters
[in]comboBPComboBox item to get Tree model from
Returns
A pointer to the GuiTreeModel, or NULL if an error occurs.
See also
mdlDialog_comboBoxSetTreeModelP
RawItemHdr* mdlDialog_comboBoxGetTreeP ( RawItemHdr comboBP)

Returns a RawItemHdr pointer of the Tree attached to the ComboBox item.

Parameters
[in]comboBPComboBox to get Tree RawItemHdr from
Returns
A pointer to the RawItemHdr of the Tree, or NULL if an error occurs
StatusInt mdlDialog_comboBoxSetAdditionalInfo ( UShort valueColIndexP,
long *  stringListIdP,
RawItemHdr comboBP 
)

Sets information about a ComboBox dialog item that cannot be set with the mdlDialog_comboBoxSetInfo function.

Parameters
[in]valueColIndexPis the index of the value column. Pass NULL in this argument if you do not want to set this value.
[in]stringListIdPis the StringList of values for the ComboBox. Pass NULL in this argument if you do not want to set this value.
[in]comboBPComboBox to set additional info for
Returns
SUCCESS, or a non-zero value if an error occurs.
See also
mdlDialog_comboBoxGetAdditionalInfo
StatusInt mdlDialog_comboBoxSetIndex ( long  index,
RawItemHdr comboBP 
)

Sets the index of the specified comboBox dialog item.

Parameters
[in]indexspecifies the index of the comboBox item.
[in]comboBPpoints to the comboBox dialog item to set the index in.
Returns
SUCCESS, or a non-zero value if an error occurs.
See also
mdlDialog_comboBoxGetIndex
StatusInt mdlDialog_comboBoxSetInfo ( CommandNumber *  commandNumberP,
UInt32 commandSourceP,
int *  maxSizeP,
WCharCP  formatToDisplayP,
WCharCP  formatToInternalP,
WCharCP  minimumP,
WCharCP  maximumP,
UInt32 maskP,
UShort nRowsP,
UShort gapWidthP,
UShort listWidthP,
UInt32 attributesP,
bool  redraw,
RawItemHdr comboBP 
)

Sets attributes of a ComboBox item.

For all of the pointer parameters, NULL indicates that the field should not be modified.

Parameters
[in]commandNumberPset NULL if not setting cmd number
[in]commandSourcePset NULL if not setting cmd source
[in]maxSizePpoints to a variable that indicates the maximum allowable size of the text string that can be contained by the ComboBox item, the maximum is 32K characters.
[in]formatToDisplayPpoints to a sprintf format string to convert the value of the variable associated with the ComboBox item into a displayable string.
[in]formatToInternalPpoints to a sscanf format string to convert from the ComboBox item's string value to the format expected by the variable associated with the ComboBox item.
[in]minimumPpoints to a string that contains the minimum value of the ComboBox item.
[in]maximumPpoints to a string that contains the maximum value of the ComboBox item.
[out]maskPpoints to a UInt32 that contains the value mask
[in]nRowsPpoints to an int that contains the number of rows displayed when the proper ListBox appears.
[in]gapWidthPpoints to an int that contains the width, in dialog coordinate units (dcoords), between the selection field and the popup list activation button.
[in]listWidthPpoints to an int that contains the width, in dialog coordinate units (dcoords), of the popup ListBox.
[in]attributesPpoints to an int that contains the ComboBox item's attributes. The bits that can be included are defined in dlogbox.r.h.
[in]redrawis a boolean flag that indicates whether mdlDialog_comboBoxSetInfo should cause the ComboBox to be redrawn after the information is modified.
[in]comboBPComboBox item to get info on
Returns
SUCCESS, or a non-zero value upon encountering an error.
ErrorCode mdlDialog_comboBoxSetListModelP ( RawItemHdr comboBP,
ListModel *  pListModel 
)

Sets the ListModel pointer used by the the ComboBox.

ListModels and StringLists are mutually exclusive.

Parameters
[in]comboBPpoints to the RawItemHdr for the ComboBox item
[in]pListModelpoints to the ListModel to be used as the data source for the ComboBox
Returns
SUCCESS, or a non-zero value if either the comboBP or pListModel is invalid.
See also
mdlDialog_listBoxGetListModelP
StatusInt mdlDialog_comboBoxSetPopupState ( RawItemHdr comboBP,
bool  bOpen 
)

Opens or closes the popup ListBox.

Parameters
[in]comboBPComboBox to process
[in]bOpentrue = open; False = close
Returns
SUCCESS if the popup ListBox was properly opened or closed, or true is there is an error.
ErrorCode mdlDialog_comboBoxSetStrListP ( RawItemHdr comboBP,
StringListP  strListP,
int  nColumns 
)

Sets the StringList used by a ComboBox item.

Parameters
[in]comboBPComboBox to set strList of
[in]strListPlist's StringList
[in]nColumnsis the number of columns per row in the ComboBox popup list.
Returns
SUCCESS, or a non-zero value if the ComboBox item's StringList could not be properly set. Usually, this implies that either comboBP or strListP is invalid.
StatusInt mdlDialog_comboBoxSetSubEditor ( RawItemHdr comboBP,
bool  bSubEditor,
RawItemHdr ownerRiP 
)

Notifies the ComboBox item of its SubEditor status.

SubEditors are used during cell editing and in IconPopup items.

Parameters
[in]comboBPpoints to the comboBox dialog item to set the index in.
[in]bSubEditorindicates whether the ComboBox item is a SubEditor.
[in]ownerRiPif the ComboBox item is a SubEditor, this is the RawItemHdr pointer of the owning dialog item.
Returns
SUCCESS, or a non-zero value if an error occurs.
See also
mdlDialog_comboBoxGetInfo
ErrorCode mdlDialog_comboBoxSetTreeModelP ( RawItemHdr comboBP,
GuiTreeModelP  pTreeModel 
)

Sets the GuiTreeModel pointer used by the the ComboBox.

GuiTreeModels, ListModels and StringLists are all mutually exclusive. The COMBOATTR_TREE attribute should be added to the resource for the ComboBox when using a Tree item and a GuiTreeModel data source.

Parameters
[in]comboBPpoints to the RawItemHdr for the ComboBox item
[in]pTreeModelpoints to the GuiTreeModel to be used as the data source for the ComboBox
Returns
SUCCESS, or a non-zero value if either the comboBP or pTreeModel is invalid.
See also
mdlDialog_listBoxGetTreeModelP

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