Recent

Author Topic: [SOLVED] How to disable a Stringgrid from updating.  (Read 5731 times)

Zittergie

  • Full Member
  • ***
  • Posts: 114
    • XiX Music Player
[SOLVED] How to disable a Stringgrid from updating.
« on: March 24, 2013, 04:47:54 pm »
Hi,

I want to randomize a stringgrid with a lot of data, but I want the randomized data only to be visible after all data is in place.  I do however want the application to show other updates, so I have a counter that does a Application.ProcessMessages once in a while.  But I don't want the stringgrid to update on Application.ProcessMessages.

Is this possible, or do I have to buffer all the data first?

I do not want to hide the Stringgrid, because the stringgrid is already filled, and has to stay visible until the update is complete.
« Last Edit: March 24, 2013, 10:57:58 pm by Zittergie »
Be the difference that makes a difference

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4650
  • I like bugs.
Re: How to disable a Stringgrid from updating.
« Reply #1 on: March 24, 2013, 05:41:59 pm »
I want to randomize a stringgrid with a lot of data, but I want the randomized data only to be visible after all data is in place...

Try:
Code: [Select]
StringGrid1.BeginUpdate;
// Your updates here
StringGrid1.EndUpdate;

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Zittergie

  • Full Member
  • ***
  • Posts: 114
    • XiX Music Player
Re: [SOLVED] How to disable a Stringgrid from updating.
« Reply #2 on: March 24, 2013, 10:58:50 pm »
Thanks,

works like magic.  Updates are really fast now.
Be the difference that makes a difference

 

TinyPortal © 2005-2018