Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Syntax 1: For ListBox, DropDownListBox, and RibbonComboBoxItem controls – PB Docs 2022 – PowerBuilder Library

Syntax 1: For ListBox, DropDownListBox, and RibbonComboBoxItem controls – PB Docs 2022

Syntax 1: For ListBox, DropDownListBox, and RibbonComboBoxItem
controls

Description

Finds the next item in a ListBox that begins with the specified
search text.

Applies to

ListBox, DropDownListBox, PictureListBox, DropDownPictureListBox,
and RibbonComboBoxItem controls

Syntax

Argument

Description

listboxname

The name of the ListBox control in which you want to
find an item.

text

A string whose value is the starting text of the item
you want to find.

index

The number of the item just before the first item to be
searched. To search the whole list, specify 0.

Return value

Integer.

Returns the index of the first matching item. To match, the item
must start with the specified text; however, the text in the item can be
longer than the specified text. If no match is found or if an error
occurs, FindItem returns -1. If any argument’s value is null, FindItem
returns null.

Usage

When FindItem finds the matching item, it returns the index of the
item but does not select (highlight) the item. To find and select the
item, use the SelectItem function.

Examples

Assume the ListBox lb_actions contains the following list:

Index number

Item text

1

Open files

2

Close files

3

Copy files

4

Delete files

Then these statements start searching for Delete starting with
item 2 (Close files). FindItem sets Index to 4:

These statements search for items in the RibbonBar
ComboBox:

See also

AddItem

DeleteItem

InsertItem

SelectItem


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x