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 - picksetact() set the active status of a list item http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 picksetact()        Set the active status of a list item
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func logical picksetact 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 active status for the item.

 Return
   A logical indicating the previous status of the item.

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

   The pickdisp() function displays non-active items with a special color
   attribute. Depending on the configuration of pickdisp(), non-active
   items may be skipped when the selection bar is moved.

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

 Example
   #define EXAMPLE_LIST
   #include example.hdr

   proc Test_picksetact
   vardef
      _SLIST  pList
      logical lFileOpen
   enddef
   pList := FileMenu()
   clear
   pickdisp( pList, 2, 2, 12, 20 )
   lFileOpen := .f.
   __syscolor[ CLR_INACT ] := BLACK_DARK_GREY // dim inactives
   if .not. lFileOpen             // deactivate non-appropriate menu items
      picksetact( pList, 4, .f. )
      picksetact( pList, 5, .f. )
      picksetact( pList, 7, .f. )
   endif
   clear
   pickdisp( pList, 2, 2, 12, 20 )
   pickclear( pList )
   endproc

   proc main
   Test_picksetact()
   endproc

See Also: pickisactive()

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