Method XbpListBox():setData() Foundation

Sets which items in the list are selected.

Syntax
:setData( [<anItems>], [<lMarked>] ) --> lSuccess
Parameters
<anItems>
<anItems> is an array of numeric values that specify which items in the list box are selected. If a data code block is contained in the instance variable :dataLink, <anItems> does not need to be specified. Instead the return value of the data code block is used for <anItems>.
<lMarked>
<lMarked> is an optional parameter with the default value .T. (true). When this instance variable is set to .T., the items specified in <anItems> are selected in the list. If .F. (false) is specified for <lMarked>, the selection markings for the specified items are removed.
Return

This method returns the value .T. (true) if the marking could be set, otherwise it returns .F. (false).

Description

The method :setData() selects items in the list of the XbpListBox object. This method differs from methods of the same name that are part of other Xbase Parts. It does not set the items in the list itself but only sets or removes the item markings. In order to mark more than one item, the instance variable :markMode must contain the value XBPLISTBOX_MM_MULTIPLE or XBPLISTBOX_MM_EXTENDED before :create() is called. Items are added to the list of the XbpListBox object using the methods :addItem() and :insertItem().

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.