SetFirstVisible PowerScript function
Description
Sets the specified item as the first visible item in a TreeView
control.
Controls
TreeView controls
Syntax
1 |
<span>treeviewname</span><span>.SetFirstVisible</span> ( <span>itemhandle</span> ) |
Argument |
Description |
---|---|
treeviewname |
The TreeView control in which you want |
itemhandle |
The handle of the item you are identifying |
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs.
Usage
Use to give focus to the TreeView item specified by the itemhandle and
scroll it to the top of the TreeView control (or as close to the
top as the item list allows; if the item is the last item in a TreeView
control, for example, it cannot scroll to the top of the control).
Examples
This example sets the current TreeView item as the
first item visible in a TreeView control:
1 |
long ll_tvi |
1 |
int li_tvret |
1 |
1 |
ll_tvi = tv_list.FindItem(CurrentTreeItem! , 0) |
1 |
1 |
li_tvret = tv_list.<span>SetFirstVisible</span>(ll_tvi) |
1 |
IF li_tvret = -1 THEN |
1 |
MessageBox("Warning!" , "Didn't Work") |
1 |
END IF |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest