Programming => LCL => Topic started by: egsuh on August 11, 2022, 01:59:47 pm
Title: Calling select/unselect events
Post by: egsuh on August 11, 2022, 01:59:47 pm
Hi, With TListView, I can assign codes to events when an item is un/selected. I'd like to do this with TStringGrid, but it responds when I just put mouse over it. Please try attached example, and please let me know if there are other ways with TStringGrids.
Title: Re: Calling select/unselect events
Post by: Zvoni on August 11, 2022, 02:14:16 pm
Use the OnSelection-Event of the TStringGrid? Then it's easy to check selection if Option goRowSelect is activated
I think OnSelect is called whenever mouse is over a cell, while the TStringGrid is focused.
What makes you tink that? I actually have a small project currently using a StringGrid where i evaluate the OnSelection-Event checking if the Row is selected or not. Hovering the Mouse above doesn't fire the event
Title: Re: Calling select/unselect events
Post by: jamie on August 13, 2022, 04:38:22 pm