using own editor for TDrawGrid lazarus / 31-LCL ---------------------------------------------------------------------- mtanner · 2018-03-27 14:42 I have a TDrawGrid, containing columns of different types. I want to use a custom editor for a particular type of data, so what I have been trying is as follows. I have an OnSelectEditor routine that check for the data type, and if relevent calls a function such as "ShowSpecialEditor", passing row/col as parameters. The ShowSpecialEditor function dynamically created the special editor as a form, and displays this form with ShowModal. The editor retrieves the appropriate data item from the apps data structures, the user interacts with the form to modify/supply data, which the editor then stores in the applications data structure (row/col tell it where to get/store the data in the app data structures. When finished the user click as OK button on the editor to exit the editor. This returns control to the ShowSpecialEditor routine, which then frees the dynamically created editor form and then  exits, returning control to the OnSelectEditor method. The OnSelectEditor routine sets Editor to nil (I presume this stops the grid invoking the standard editor). This appears to - sort of - work, but with some problems. I click on a grid cell to invoke the editor, which happens ok. But after exit, whenever the mouse is on another cell in the same column (just over, not clicked) the editor is immediately invoked. I suppose the gris has been left in some "incomplete edit" state, but I can't see any way of preventing this. Any suggestions please? Possibly relevant factors: not using the columns feature AutoEdit=true goAlwaysShowEditor=false ---------------------------------------------------------------------- jamie · 2018-03-27 21:21 I always have the Editors pre-created and keep them alive, I also at times assign the owner of the editors to the grid so when deleting the grid the editors will go with it.  with the OnSlectEcitor, I just set the Return Variable.. The grid does the rest like calling the standard show etc.  Also in the OnSelectEditor, is a good time to define specific info for that Cell..  It seems to work for me..