home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / pascal / 5269 < prev    next >
Encoding:
Internet Message Format  |  1992-09-09  |  1.5 KB

  1. Path: sparky!uunet!bonnie.concordia.ca!IRO.UMontreal.CA!iros1!shen
  2. From: shen@nil.IRO.UMontreal.CA (Yu Shen)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Track double clicks in HandleEvent, etc.
  5. Message-ID: <SHEN.92Sep9131200@nil.IRO.UMontreal.CA>
  6. Date: 9 Sep 92 18:12:00 GMT
  7. Sender: news@IRO.UMontreal.CA
  8. Organization: Universite de Montreal -- Laboratoire Incognito
  9. Lines: 40
  10.  
  11. Hi, folks,
  12. Would you kindly give me a pointer of how to track mouse double clicks
  13. in HandleEvent procedure. For example, I would like have something
  14. like the following:
  15.  
  16. procedure TMyView.HandleEvent(var Event: TEvent); 
  17. begin
  18.   TView.HandleEvent(Event);
  19.   case Event.What of
  20.   evMouse:
  21.    if Event.Double then SelectIt; {it is never reached!}
  22.   evMouseDown:
  23.    FocusIt;
  24.   evMouseAuto:
  25.    DragView(Event, dmDragMove, TheLimits, AMinSize, AMaxSize); 
  26.     {I want to drag the view, when the mouse button is pressed,
  27. and moved. I am not sure if it's correct?}
  28.   else
  29.    Exit;
  30.   end;
  31. end;
  32.  
  33. When debugging, I found that Event.Double is always FALSE, thus the
  34. appropriate action is never reached. Why?
  35.  
  36. And I don't quite understand the meaning of evMouseAuto. According to
  37. TP Vision guide: periodic event while mouse button held down. But in
  38. debugging, I noticed that after mouse button is released, there are
  39. still endless evMouseAuto events.
  40. Anyway, I'd like to know how implement dragging a view by helding
  41. mouse button.
  42.  
  43. Thank you in advance,
  44. --
  45. Yu Shen
  46. Dept. d'Informatique et Recherche Operationnelle
  47. University de Montreal, C.P. 6128 Succ. A.
  48. Montreal, Que. Canada, H3C 3J7
  49.  
  50. (514) 342-7089 (H) shen@IRO.UMontreal.Ca
  51.