SetFocus PowerScript function
Description
Sets the focus on the specified object or control.
Controls
Any object
Syntax
1 |
<span>objectname</span>.<span>SetFocus</span> ( ) |
Argument |
Description |
---|---|
objectname |
The name of the object or control in |
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs. If objectname is null, SetFocus returns null.
Usage
If objectname is a ListBox, SetFocus displays
the focus rectangle around the first item. If objectname is
a DropDownListBox, SetFocus highlights the edit box.
To select an item in a ListBox or DropDownListBox, use SelectItem.
Drawing objects cannot have focus. Therefore, you cannot use SetFocus to
set focus to in a Line, Oval, Rectangle, or RoundRectangle.
Examples
This statement in the script for the Open event in
a window moves the focus to the first item in lb_Actions:
1 |
lb_Actions.<span>SetFocus</span>() |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest