Re:Click and double click problem on TImage
OK, i have found a nice solution for it on the internet in the
newsgroups, and it goes like this -
Use a timer with interval which is the max time in double click
between the first and the second click ( there is a function
that gives you this value ) then, on the OnClick event start
this timer, on the Double-Click event in the first line stop
the timer, then write the code for the Double-Click. on the
timer OnTick event write the code for the one Click event.
If there will be one click then the timer function will be call
and the OnClick code will be running, on the other hand, if
there will be a double click, then only the code of the double
click will be running, becouse the time function will not be
called.
This is for anyone that is interesting, i think it's really nice.
Ruby
Quote
"Ruby" <NoM...@please.com> wrote:
>I created a TImage, i need it to do one operatoin if the user
>click it one time, and to do other operation if the user double
>click it.
>The problem is that when i double click it, first it goes to the
>click event! and only then to the double click event! why does it
>happen?? why does it goes to the click event when the user double
>click on it?? it's really a problem becouse when the user double
>click the image i don't want to run the part of code in the click
>event, only the one in the double click event.
>Why does it happen? What is the solution?
>Thanks,
> Ruby