Available in:
Apps (win)
Apps (char)
Reportwriter
RPC
Standalone PL
X
expr list_treeview(list-name,row,col,height,width) list list-name int row,col,height,width
list-name | specifies the list.
|
row |
specifies the row position of the view box. -1 places the upper
left of the box at the cursor position. -2 places the box in the center of the screen.
|
col |
specifies the column location of the view box. -1 places the upper left of the box at the cursor position. -2 places the box in the
center of the screen.
|
height |
specifies the height for the displayed window in cells.
|
width |
specifies the width for the displayed window in cells.
|
{ int i,rc; list LL,L2; LL = list_open("20 6",0,"A brand new title","Line one","Second line"); L2 = list_open("20 6",0); list_mod(L2,1,"One","1"); list_mod(L2,1,"Two",2); list_mod(L2,1,"Three","3"); list_mod(LL,1,"Level",L2); list_mod(LL,1,"Leaf","99"); while (true) { rc = list_treeview(LL,-2,-2,8,20); if (rc == NULL) break; prompt(rc); } }Load a list with departments and the employees who work in each department.
{ int i,rc; list LL,L2; LL = list_open("select deptname,deptnumb from org order by 1",999); for (i=list_rows(LL);i;i--) { L2 = list_open("select name,id from staff " "where dept = &/list_curr(LL,1)/ order by 1", 999); list_modcol(LL,1,L2); list_next(LL); } prompt(list_treeview(LL,-2,-2,10,40)); }