home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / macros / moveview.lx < prev    next >
Encoding:
Text File  |  1996-02-22  |  686 b   |  26 lines

  1. /* This macro provides is invoked after pressing F1 */
  2. /* changes focus based on arrow key direction */
  3.  
  4. 'keyread'  /* wait for key */
  5. 'extract lastkey'
  6.  
  7. select
  8.   when lastkey = "UP" then do
  9.                  'LP_PREVRING'
  10.                   end
  11.   when lastkey = "DOWN" then do
  12.                  'LP_NEXTRING'
  13.                   end
  14.   when lastkey = "RIGHT" then do
  15.                  'LP_NEXTRING'
  16.                   end
  17.   when lastkey = "LEFT" then do
  18.                  'LP_PREVRING'
  19.                  end
  20.   when lastkey = "ESC" then do
  21.             MSG 'Command canceled'
  22.                  end
  23.  
  24.   otherwise MSG 'You must choose an arrow key to change focus'
  25.       end
  26.