lbAdd: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (<pre> to <code> + "see also")
Line 12: Line 12:


| Adds an item with the given text to the listbox or combobox with id idc of the topmost user [[dialog]].
| Adds an item with the given text to the listbox or combobox with id idc of the topmost user [[dialog]].
 
<br>
It returns the index of the newly added item. |= Description
It returns the index of the newly added item. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 33: Line 33:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>_index = lbAdd [101, "First item"]</pre> |= Example 1
|x1= <code>_index = [[lbAdd]] [101, "First item"];</code> |= Example 1
|x2= <pre>_index = _control lbAdd "First item"</pre> |= Example 2
 
|x2= <code>_index = _control [[lbAdd]] "First item";</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[lbClear]], [[lbColor]], [[lbCurSel]], [[lbData]], [[lbDelete]], [[lbIsSelected]], [[lbPicture]], [[lbSelection]], [[lbSetColor]], [[lbSetCurSel]], [[lbSetData]], [[lbSetPicture]], [[lbSetSelected]], [[lbSetTooltip]], [[lbSetValue]], [[lbSize]], [[lbSort]], [[lbSortByValue]], [[lbText]], [[lbValue]] |= See also


}}
}}

Revision as of 03:30, 11 April 2014

Hover & click on the images for description

Description

Description:
Adds an item with the given text to the listbox or combobox with id idc of the topmost user dialog.
It returns the index of the newly added item.
Groups:
Uncategorised

Syntax

Syntax:
Number = lbAdd [idc, text]
Parameters:
[idc, text]: Array
idc: Number of control
text: String
Return Value:
Number

Alternative Syntax

Syntax:
control lbAdd text
Parameters:
control: Control
text: String
Return Value:
Number

Examples

Example 1:
_index = lbAdd [101, "First item"];
Example 2:
_index = _control lbAdd "First item";

Additional Information

See also:
lbClearlbColorlbCurSellbDatalbDeletelbIsSelectedlbPicturelbSelectionlbSetColorlbSetCurSellbSetDatalbSetPicturelbSetSelectedlbSetTooltiplbSetValuelbSizelbSortlbSortByValuelbTextlbValue

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section