IUIX_Combo::InsertItem Method
From PDF XChange PDF SDK
m (Automatic page editing by robot) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
[[Category:Editor]] | [[Category:Editor]] | ||
{{#customTitle:IUIX_Combo::InsertItem Method}} | {{#customTitle:IUIX_Combo::InsertItem Method}} | ||
− | {{#parentPage:PXV:IUIX_Combo|InsertItem | + | {{#parentPage:PXV:IUIX_Combo#Methods|InsertItem|method}} |
− | + | ||
Inserts ''new item'' into [[PXV:IUIX_Combo|combo box]]. | Inserts ''new item'' into [[PXV:IUIX_Combo|combo box]]. | ||
Line 9: | Line 9: | ||
== Syntax == | == Syntax == | ||
<pre class="brush:cpp;gutter:false">HRESULT InsertItem([in] LONG nInsertBefore, | <pre class="brush:cpp;gutter:false">HRESULT InsertItem([in] LONG nInsertBefore, | ||
− | [in] BSTR | + | [in] BSTR sText, |
− | [in, defaultvalue("")] BSTR | + | [in, defaultvalue("")] BSTR sTooltip, |
[in, defaultvalue(NULL)] IUnknown* pImage, | [in, defaultvalue(NULL)] IUnknown* pImage, | ||
[in, defaultvalue(0)] PARAM_T nItemParam, | [in, defaultvalue(0)] PARAM_T nItemParam, | ||
Line 18: | Line 18: | ||
;nInsertBefore | ;nInsertBefore | ||
:[in] specifies the position in a list before which a new item should be inserted. To insert new item at the end of combo box list, set this parameter to -1. | :[in] specifies the position in a list before which a new item should be inserted. To insert new item at the end of combo box list, set this parameter to -1. | ||
− | ; | + | ;sText |
:[in] specifies text of the new item. | :[in] specifies text of the new item. | ||
− | ; | + | ;sTooltip |
:[in, defaultvalue("")] specifies item tooltip. | :[in, defaultvalue("")] specifies item tooltip. | ||
;pImage | ;pImage | ||
Line 30: | Line 30: | ||
== Return Value == | == Return Value == | ||
− | Returns S_OK if operation was successful or error code | + | Returns S_OK if the operation was successful, or will return an error code if it fails. |
== See Also == | == See Also == | ||
− | [[PXV:IUIX_Combo|IUIX_Combo]] | + | [[PXV:IUIX_Combo|IUIX_Combo]] |
Latest revision as of 13:13, 15 June 2015
Inserts new item into combo box.
Syntax
HRESULT InsertItem([in] LONG nInsertBefore, [in] BSTR sText, [in, defaultvalue("")] BSTR sTooltip, [in, defaultvalue(NULL)] IUnknown* pImage, [in, defaultvalue(0)] PARAM_T nItemParam, [in, defaultvalue(0)] LONG nItemStyle);
Parameters
- nInsertBefore
- [in] specifies the position in a list before which a new item should be inserted. To insert new item at the end of combo box list, set this parameter to -1.
- sText
- [in] specifies text of the new item.
- sTooltip
- [in, defaultvalue("")] specifies item tooltip.
- pImage
- [in, optional] adds item image, displayed to the left of item text. pImage object should implement IUIX_Icon or IUIX_ImageData interface.
- nItemParam
- [in, defaultvalue(0)] sets optional item parameter.
- nItemStyle
- [in, defaultvalue(0)] sets item style flags. See UIX_ComboItemStyleFlags enumeration for full list of possible item styles.
Return Value
Returns S_OK if the operation was successful, or will return an error code if it fails.