ListBox

ListBoxSetItem

Replace the text and data of a list item

Syntax

Signature
xBool        ListBoxSetItem( ListBox *listBox, int position, ListBoxItem item );

Arguments

listBox the list box.

position the one-based position of an existing item.

item a ListBoxItem with text and data strings to copy. item.text must be present. item.data can be NULL to clear the associated data.

Return value

T on success, or F if the object is NULL, item.text is NULL or position is outside the item list.

Description

The replacement keeps its position in the list. Call `ListBoxDisplay()` to draw the new text.

See also