Vcl.StdCtrls.TCustomListBox.DoFindData

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function DoFindData(const Data: String): Integer;

C++

int __fastcall DoFindData(const System::UnicodeString Data);

Properties

Type Visibility Source Unit Parent
function protected
Vcl.StdCtrls.pas
Vcl.StdCtrls.hpp
Vcl.StdCtrls TCustomListBox

Description

Returns the index of a string in the list box.

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.

See Also