[SOLVED]advice: Let user change a grids' options without repainting it lazarus / 31-LCL ---------------------------------------------------------------------- kinlion · 2018-11-24 10:30 I want to draw merged cells with TStringGrid, and write drawing code in a StringGrid's OnDrawCell event. But after calling the event handler, TStringGrid will draw the cell border. That's not my want. Then I remove goHorzLine from the StringGrid's Options in OnDrawCell, unfortunately this maks a dead-loop because after setting the Options, the StringGrid will be fully repainted. Since FOptions is private of TCustomGrid, I have to add a public procedure to TCusomGrid to modify the Options. Maybe it's better to let TCustomGrid have a way to modify Options without repaint? ---------------------------------------------------------------------- wp · 2018-11-24 10:33 Did you try to call Grid.BeginUpdate before and Grid.EndUpdate after your changes? They should suppress any redraw requests in between. ---------------------------------------------------------------------- kinlion · 2018-11-24 10:36 let me try ---------------------------------------------------------------------- kinlion · 2018-11-24 10:40 YES, BeginUpdate/EndUpdate works well.  Thank you very much! Quote from: wp on November 24, 2018, 11:33:00 amDid you try to call Grid.BeginUpdate before and Grid.EndUpdate after your changes? They should suppress any redraw requests in between.