Squall_FF8 1 Posted March 6 Hey Guys, I have a TGrid in my project. It works great, but I want to change the colors of row/columns lines? How I can do that in FMX for Delphi 12.2? Share this post Link to post
Serge_G 90 Posted March 7 (edited) Quick response, use OnDrawColunmnCell event. You can see also how I manage a Data Grid CopyToClipBoard GitHub link. I don't remember if in that repository I use TStyleBook, on a French forum I worked this Edited March 7 by Serge_G Share this post Link to post
Squall_FF8 1 Posted March 10 On 3/7/2025 at 9:55 AM, Serge_G said: Quick response, use OnDrawColunmnCell event. You can see also how I manage a Data Grid CopyToClipBoard GitHub link. I don't remember if in that repository I use TStyleBook, on a French forum I worked this Thank you Serge_G! Correct me if I'm wrong, but looking in your code on Github and the French forum, I have to implement it by hooking OnDrawColunmnCell. If I want to manipulate: - the background color of cells:, FillRect - the border color of cells: FillStroke Share this post Link to post
Serge_G 90 Posted March 10 Hooking !? no except if you want to export data for selected cells (wich was my goal). You only have to use OnDrawColumnCell event like in ExportStringGridMain.pas, (procedure TFormTest.StringGrid1DrawColumnCell ) Share this post Link to post
Squall_FF8 1 Posted March 11 16 hours ago, Serge_G said: Hooking !? no except if you want to export data for selected cells (wich was my goal). You only have to use OnDrawColumnCell event like in ExportStringGridMain.pas, (procedure TFormTest.StringGrid1DrawColumnCell ) Sorry,, by hooking I mean using OnDrawColunmnCell 🙂 Share this post Link to post