HbListBox() > Methods xHarbour Developers Network  

oHbListBox:findText()

Determines the position of an item within a list

Syntax

oHbListBox:findText( <cText>          , ;
                    [<nStartPos>]     , ;
                    [<lCaseSensitive>], ;
                    [<lExact>]          ) --> nItemPos

Arguments

<cText>
This is a character string holding the textual information of a list box item to find.
<nStartPos>
This is a numeric value indicating the first item in the list box to begin the search with. It defaults to 1, the first item in the list.
<lCaseSensitive>
This parameter defaults to .T. (true) causing the method to perform a case sensitive search. Setting <lCaseSensitive> to .F. (false) searches case insensitive.
<lExact>
If specified, <lExact> defines the SET EXACT setting for the string comparison. during the search. The value .T. (true) represents ON, and .F. (false) means OFF.

Description

Method :findText() searches a list box item by its textual representation displayed in the list box. If <cText> is found in the internal item list, the method returns a numeric value indicating the ordinal position of the found list box item. Use method :getItem() to retrieve the found list box item.

When <cText> cannot be found, the return value is zero.


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe