IUIX_Combo::InsertItem Method

From PDF XChange PDF SDK
Jump to: navigation, search
(Automatic page editing by robot)
 
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IUIX_Combo::InsertItem Method}}
 
{{#customTitle:IUIX_Combo::InsertItem Method}}
 +
{{#parentPage:PXV:IUIX_Combo#Methods|InsertItem|method}}
  
The method of interface of PDF-XChange Editor SDK.
+
 
 +
Inserts ''new item'' into [[PXV:IUIX_Combo|combo box]].
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT InsertItem([in] LONG nInsertBefore, [in] BSTR pText, [in, optional] BSTR pTooltip, [in, optional] IUnknown* pImage, [in, optional] ULONG_PTR nItemParam, [in, optional] LONG nItemStyle);</pre>
+
<pre class="brush:cpp;gutter:false">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);</pre>
  
 
== Parameters ==
 
== Parameters ==
;''nInsertBefore''
+
;nInsertBefore
:[in]  Value of LONG.
+
:[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.
;''pText''
+
;sText
:[in]  Value of BSTR.
+
:[in]  specifies text of the new item.
;''pTooltip''
+
;sTooltip
:[in, optionalValue of BSTR.
+
:[in, defaultvalue("")specifies item tooltip.
;''pImage''
+
;pImage
:[in, optional]  Pointer to IUnknown*.
+
:[in, optional]  adds item image, displayed to the left of item text. '''pImage''' object should implement [[PXV:IUIX_Icon|IUIX_Icon]] or [[PXV:IUIX_ImageData|IUIX_ImageData]] interface.
;''nItemParam''
+
;nItemParam
:[in, optionalValue of ULONG_PTR.
+
:[in, defaultvalue(0)sets optional item parameter.
;''nItemStyle''
+
;nItemStyle
:[in, optionalValue of LONG.
+
:[in, defaultvalue(0)sets item style flags. See [[PXV:UIX_ComboItemStyleFlags|UIX_ComboItemStyleFlags]] enumeration for full list of possible item styles.
  
 
== Return Value ==
 
== Return Value ==
Returns S_OK if operation was successful or error code in other cases.
+
Returns S_OK if the operation was successful, or will return an error code if it fails.  
  
 
== See Also ==
 
== See Also ==
See also [[PXV:IUIX_Combo|IUIX_Combo]].
+
[[PXV:IUIX_Combo|IUIX_Combo]]

Latest revision as of 14: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.

See Also

IUIX_Combo