Clearing the search results in a TStringGrid lazarus / 16-Databases ---------------------------------------------------------------------- Bert_Plitt · 2020-12-08 01:16 Hello all -- Can anyone help me with the following?  The attachment is a demo project to tests searching the text in a TStringGrid.  In the Project, the Load button fills the grid with data and the Search button searches the grid for a match to the search string.  The search can be done within the selected column or over the entire grid, depending on the Search Method selected.  When a match is found, the cell(s) containing the matching text is highlighted in yellow.  My problem is that I have not been able supply code that switches the yellow cells back to their original color.  Can anyone show me how to clear the yellow highlights when the Clear button is clicked? ---------------------------------------------------------------------- mangakissa · 2020-12-09 12:22 Set your array to 0 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.btnClearClick(Sender: TObject);begin  SetLength(Results,0);  StringGrid1.Repaint;end; ---------------------------------------------------------------------- Bert_Plitt · 2020-12-09 15:55 Thanks.  That does it, so simple.