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

SetState – PB Docs 126 – PowerBuilder Library

SetState – PB Docs 126

SetState PowerScript function

Description

Sets the highlighted state of an item in a list box. SetState is
only applicable to a list box control whose MultiSelect property
is set to true.

Controls

ListBox and PictureListBox controls

Syntax

Argument

Description

listboxname

The name of the ListBox or PictureListBox
in which you want to set the state (highlighted or not highlighted)
for an item. The MultiSelect property for the control must be set
to true.

index

The number of the item for which you
want to set the state. Specify 0 to set the state of all the items
in the ListBox.

state

A boolean value that determines the state
of the item:

  • TRUE – Selected

  • FALSE – Not selected

Return Values

Integer. Returns 1 if it succeeds and
-1 if an error occurs. If any argument’s value is null, SetState returns null.

Usage

When the MultiSelect property for the control is false,
use SelectItem, instead of SetState,
to select one item at a time.

Examples

This statement turns on the highlight for item 6
in lb_Actions:

This statement deselects all items in lb_Actions:

This statement turns off the highlight for item 6
in lb_Actions if it is selected and
turns it on again if it is not selected:

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