Board index » delphi » TStringGrid fires OnClick when using Mousewheel

TStringGrid fires OnClick when using Mousewheel

Hi,

when I put an empty StringGrid on a form
(sized without visible Scrollbars), run that
project and move the mousewheel:
the StringGrid fires OnClick events. Why?

How can I prevent this? :-S

I have to find out if a Click was a Click,
not a MouseWheel thing.

Thanks for any hint.

Steve.

 

Re:TStringGrid fires OnClick when using Mousewheel


Hello Steve,

Quote
"Steve" <no.s...@inbox.com> wrote in message

news:3e462a7f@newsgroups.borland.com...

Quote
> when I put an empty StringGrid on a form
> (sized without visible Scrollbars), run that
> project and move the mousewheel:
> the StringGrid fires OnClick events. Why?

The name of that event handler is somewhat misleading. It should be
OnChange instead of OnClick because it fires whenever the grid's
current cell changes regardless of the reason the change occured
(mouse, keyboard, wheel etc).

Use the OnMouseDown or OnMouseUp handlers instead of OnClick.

Other Threads