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

SelectedItem – PB Docs 125 – PowerBuilder Library

SelectedItem – PB Docs 125

SelectedItem PowerScript function

Description

Obtains the text of the selected item in a ListBox control.

Controls

ListBox and PictureListBox controls

Syntax

Argument

Description

listboxname

The name of the ListBox or PictureListBox
in which you want the text of the currently selected item

Return Values

String. Returns the text of the selected
item in listboxname. Returns the empty string
(“”) if no items are selected. If listboxname is null, SelectedItem returns null.

Usage

SelectedIndex and SelectedItem are
meant for lists that allow a single selection only (when the MultiSelect
property for the control is false).

When the MultiSelect property is true, SelectedItem gets
the text of the first selected item only. Use the State function,
instead of SelectedItem, to check each item in
the list and find out if it is selected. Use the Text function
to get the text of any item in the list.

Examples

If the text of the selected item in the ListBox lb_shortcuts is
F1, then this example sets ls_item to
F1:

See Also


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