Problems with DblClick event in a StringGrid and ColumnSortClick lazarus / 31-LCL ---------------------------------------------------------------------- critter · 2020-06-20 15:57 Hello good day. I wanted to see if they can help me with my problem, since I have a StringGrid that when performing the DblClick event opens a form for me to edit according to the line that is found and with the ColumnSortClick option activated. My problem is that when I perform a DblClick on the header it orders the selected column, but it also executes the DblClick event, which I understand should not happen. Is there a solution to silence the DblClick event when done in the header? Thank you. ---------------------------------------------------------------------- jamie · 2020-06-20 16:40 where does it say that about the double click ? ---------------------------------------------------------------------- wp · 2020-06-20 16:45 You can read the y coordinate of the mouse position in the OnDblClick handler and exit if y is less than the height of the FixedRow: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.StringGrid1DblClick(Sender: TObject);var  P: TPoint;begin  P := StringGrid1.ScreenToClient(Mouse.CursorPos);  if P.Y < StringGrid1.RowHeights[0] then    exit;  // your code here  // ...end; ---------------------------------------------------------------------- critter · 2020-06-20 17:37 thanks, it already works, but how can it be solved if FixedRows is greater than 1? ---------------------------------------------------------------------- wp · 2020-06-20 17:41 Quote from: critter on June 20, 2020, 07:37:33 pmhow can it be solved if FixedRows is greater than 1? I don't understand what you mean. StringGrid.RowHeights[0] is the height of the FixedRow. ---------------------------------------------------------------------- jamie · 2020-06-20 17:42 use MouseToCell instead and test against the FixedROW/COL count. ---------------------------------------------------------------------- critter · 2020-06-20 17:46 Thanks