cooldude@jessica.stanford.edu (Imran Qureshi) (06/03/91)
This may be a pretty silly question but I couldn't find the exact
answer in the UseNet guide.
I am using TCL 4.0.5. I wanna distinguish between a double click, a
single click and a click & drag. I wrote the following code to check
for double click. This is called by the DoClick method of the Pane.
----------------------------------------------------------------
Boolean IfDoubleClick()
{
while ((gLastMouseDown.when-gLastMouseUp.when)<GetDblTime())
if (!StillDown()) return(TRUE);
return(FALSE);
}
---------------------------------------------------------
However, I don't get the right result. Someone out there wanna tell
me what I'm doing wrong and if there is a better way of doing this.
Imran