No refreshing data in TStringGrid lazarus / 31-LCL ---------------------------------------------------------------------- Ed78z · 2021-08-26 15:26 Hi, I am using a StringGrid in my app, there are thousands of information in loop that I am adding one by one to the StringGrid. However, the StringGrid doesn't shows the added data until the loop is done. I mean, for a 30 seconds it's blank and showing nothing, this is what I hate! If I am adding one by one those data to the StringGrid, why it's not updating itself to show data while the loop it's still adding them into it? Could you please help? ---------------------------------------------------------------------- dseligo · 2021-08-26 15:48 You can also use Application.ProcessMessages; It will refresh all controls. And don't refresh it in every pass in the loop. Use something like this: If (iMyCounter mod 1000) = 0 then Application.ProcessMessages; // or mystringgrid.repaint as jamie said ---------------------------------------------------------------------- Tony Stone · 2021-08-26 16:19 Quote from: Aqdam1978@yahoo.com on August 26, 2021, 05:26:12 pmHi, I am using a StringGrid in my app, there are thousands of information in loop that I am adding one by one to the StringGrid. However, the StringGrid doesn't shows the added data until the loop is done. I mean, for a 30 seconds it's blank and showing nothing, this is what I hate! If I am adding one by one those data to the StringGrid, why it's not updating itself to show data while the loop it's still adding them into it? Could you please help? I have a StringGrid in my application with same issue as you.  What I did is put my code in another thread where it processes information to be displayed in the grid.  Then the thread sends the info to the main thread where it is added to the thread.  I am pretty new so I understand if threading is overwhelming but there is an awesome package/component you can install to help write multi threaded applications!  https://github.com/wadman/wthread I think it is also available in the OPM.  (Online Package Manager) Using another thread made a very impressive increase in performance of my application as well. If you would like I can try to make a demo application with the threading component and adding information to a grid... let me know.