Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - picksetmarked() set the marked status of a list item http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 picksetmarked()     Set the marked status of a list item
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func logical picksetmarked extern
   param value _LIST   pList, ;
         value uint    uItem, ;
         value logical lStatus

 Arguments
   pList is a list pointer.
   uItem is a list item index.
   lStatus is the marked status of the item.

 Return
   A logical indicating the previous status for the item.

 Description
   This function sets the marked state of the specified list item according
   to the value of lStatus. When initialized, all items in a list are
   unmarked by default.

   The pickdisp() function displays marked items with a "tick marker".
   By default, the marker (.) is shown in the rightmost column of the item.
   Both defaults, the marker character and its position can be changed via
   the picksetmarkch() and picksetmarkpos() functions.

   This function is normally used with string lists to be displayed via the
   pickdisp() function.

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   proc Test_picksetmarked
   vardef
      _SLIST pList
   enddef
   pList := pickinit()
   
   pickadd( pList, "One" )
   pickadd( pList, "Two" )
   pickadd( pList, "Three" )
   pickadd( pList, "Four" )
   pickadd( pList, "Five" )
   
   picksetmarked( pList, 3, .t. )
   
   ? pickismarked( pList, 1 )  // output: .f.
   ? pickismarked( pList, 3 )  // output: .t.
   
   pickclear( pList )
   endproc

   proc main
   Test_picksetmarked()
   endproc

See Also: pickismarked()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson