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 - picksethotch() define the hot-key marker character of a list http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 picksethotch()      Define the hot-key marker character of a list
------------------------------------------------------------------------------
 Declaration
   pick.hdr

 Syntax
   func uint picksethotch extern
   param value _LIST pList, ;
         value uint  uHotchar

 Arguments
   pList is a list pointer.
   uHotchar is the ASCII code for the list hot key indicator character.

 Return
   The ASCII code of the previously defined lead-in character.

 Description
   The picksethotch() function is used to redefine the lead-in character
   indicating the hot keys in a pick list with the ASCII code of the new
   character in uHotChar. By default, the ampersand character (&) is taken as
   the lead-in character for hot-keys by the pickdisp() and pickstring()
   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_picksethotch
   vardef
      _SLIST pList
   enddef
   pList := pickinit()
   pickadd( pList, "&First item" )
   pickadd( pList, "Seco$nd item" )
   
   ? pickstring( pList, 1 )                        // output: First item
   ? pickstring( pList, 2 )                        // output: Seco$nd item
   
   picksethotch( pList, '$' )
   
   ?
   ? pickstring( pList, 1 )                        // output: &First item
   ? pickstring( pList, 2 )                        // output: Second item
   
   pickclear( pList )
   endproc

   proc main
   Test_picksethotch()
   endproc

See Also: pickhotch()

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