RAD Studio VCL Reference
TCustomListBox.DoFindData Method

Returns the index of a string in the list box.

function DoFindData(const Data: String): Integer;
__fastcall int DoFindData(const AnsiString Data);

This protected method is called automatically when the list box needs to indicate the index for an item.  

If the list box is virtual (that is, if the value of the Style property is lbVirtual or lbVirtualOwnerDraw), DoFindData generates an OnDataFind event so that the index can be provided dynamically. If the list box is not virtual (any other Style), DoFindData locates the specified string from the Items property and returns its index. 

Data is the text of the item to locate. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!