home *** CD-ROM | disk | FTP | other *** search
/ DOS Wares / doswares.zip / doswares / DATABASE / DBASE5 / CUA_SAMP.ZIP / LOOKKEY.PRG < prev    next >
Encoding:
Text File  |  1994-06-24  |  1.3 KB  |  44 lines

  1. PROCEDURE LookKey
  2. *----------------------------------------------------------------------------
  3. * NAME
  4. *   LookKey() - Key and mouse event handler for lookup table.
  5. *
  6. *----------------------------------------------------------------------------
  7. *    PRIVATE Form, This
  8.  
  9.     IF Event.EventType = 16
  10.         IF Event.KeyValue = 13
  11.             Event.EventType = 0   && Eat the event, so the object doesn't
  12.             Lookup.Action = .T.
  13.             lVoid = Lookup.Close()
  14.         ENDIF
  15.     ELSE
  16.         IF Event.EventType = 1
  17.             nRow = Event.MouseRow
  18.             nCol = Event.MouseColumn
  19.  
  20.             *-----------------------------------------------------------
  21.             *-- Check for a double click on the scroll bar and ignore it
  22.             *-----------------------------------------------------------
  23.             DO CASE
  24.                 CASE nRow <= 2
  25.                     RETURN
  26.                 CASE nCol = 0
  27.                     RETURN
  28.                 CASE nCol + 1 = Lookup.Width
  29.                     RETURN
  30.                 CASE nRow + 1 = Lookup.Height
  31.                     RETURN
  32.             ENDCASE
  33.             Event.EventType = 0   && Eat the event, so the object doesn't
  34.             Lookup.Action = .T.
  35.             lVoid = Lookup.Close()
  36.         ENDIF
  37.     ENDIF
  38.  
  39. RETURN 
  40. *-- EOP: LookKey(  )
  41.  
  42.  
  43.  
  44.