home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!bonnie.concordia.ca!IRO.UMontreal.CA!iros1!shen
- From: shen@nil.IRO.UMontreal.CA (Yu Shen)
- Newsgroups: comp.lang.pascal
- Subject: Track double clicks in HandleEvent, etc.
- Message-ID: <SHEN.92Sep9131200@nil.IRO.UMontreal.CA>
- Date: 9 Sep 92 18:12:00 GMT
- Sender: news@IRO.UMontreal.CA
- Organization: Universite de Montreal -- Laboratoire Incognito
- Lines: 40
-
- Hi, folks,
- Would you kindly give me a pointer of how to track mouse double clicks
- in HandleEvent procedure. For example, I would like have something
- like the following:
-
- procedure TMyView.HandleEvent(var Event: TEvent);
- begin
- TView.HandleEvent(Event);
- case Event.What of
- evMouse:
- if Event.Double then SelectIt; {it is never reached!}
- evMouseDown:
- FocusIt;
- evMouseAuto:
- DragView(Event, dmDragMove, TheLimits, AMinSize, AMaxSize);
- {I want to drag the view, when the mouse button is pressed,
- and moved. I am not sure if it's correct?}
- else
- Exit;
- end;
- end;
-
- When debugging, I found that Event.Double is always FALSE, thus the
- appropriate action is never reached. Why?
-
- And I don't quite understand the meaning of evMouseAuto. According to
- TP Vision guide: periodic event while mouse button held down. But in
- debugging, I noticed that after mouse button is released, there are
- still endless evMouseAuto events.
- Anyway, I'd like to know how implement dragging a view by helding
- mouse button.
-
- Thank you in advance,
- --
- Yu Shen
- Dept. d'Informatique et Recherche Operationnelle
- University de Montreal, C.P. 6128 Succ. A.
- Montreal, Que. Canada, H3C 3J7
-
- (514) 342-7089 (H) shen@IRO.UMontreal.Ca
-