Contents | Index | < Browse | Browse >

 ---------------------------- LISTVIEWS -----------------------------

 Listviews are special. They are made current upon being clicked on,
 or upon being specifically chosen with the LVUSE command.

 All types of Listviews have lines. The vars $$LV.LINE, $$LV.TYPE
 and $$LV.REC, refer to the CURRENT LINE, which is the line that was 
 last clicked on or the line that was last acted upon with something
 like an LVMULTI, LVSEARCH, LVFIND or LVGO command.

 Each Listview keeps track of it's own current line, so you can
 have many listviews and use the LVUSE command to switch between them.
 The current line of each listview will be remembered when you get
 back to it (with an LvMulti-next command, for example).

 LV.LINE         Current line No (or "" for no current line)
 LV.REC          The text of the current line
 LV.TYPE         Type of current line (DEV,VOL,ASN,DIR,FILE,NONE)
 LV.SEL          = 1 if line is selected, 0 if not
 LV.MODE         What the mode of the lv is (NUM,TXT,MULTI,DIR)
 LV.DIR          (for directory LVs) The current directory
 LV.TOTAL        The total number of lines the lv has
 LV.GUI          the LV's gui name
 LV.ID           the LV's ID (or 0 for no ID declared)
 LV.VAR          the (full path of) the name of the listview variable. 
                 eg: mygui.gc/myvar

 Note that in Gui4Cli the number 0 is a valid number (like in C)
 The first line of a listview is line number 0. So if there is
 no current line you will get a "" i.e. nothing (not 0)

   example :

   lvuse mygui 1             ; make LV No 1 in mygui, "current"
   lvgo first                ; go to the first record (no 0)
   say 'Line = $$LV.LINEn'  ; will print : Line = 0
   while $$LV.LINE > ""      ; while line is more than nothing..
      say '$$LV.RECn'       ; print the text of the current line
      lvgo next              ; go to the next line
   endwhile

 The above will print out all the lines in a listview.