Is it possible in C ++ Builder 2010? Let me explain: there is, let's say, a StringGrid1 with two strings, the second is empty. There is a StringGrid2, say, also with two lines, the second is empty, there is a ValueListEditor - also empty.

Now - there is a timer, which every second takes data from the server, and spreads it over these components. If it is stupid to drive reception from the server into the timer, then garbage will come out. It is necessary that the components, so to speak, erase the previous data received from themselves, and enter new ones.

Or maybe there is a simpler solution?

ps And so, that would not scrolls naughty)

  • Almost all components have a clear property: stringgrid1.clear and so on. - user1480
  • StringGrid does not have such a property. - DizzWebS
  • Randomly edited. The question can be closed. - DizzWebS

1 answer 1

StringGrid strings and columns have a Clear method that clears them. Component cleaning

var i, j: Integer; begin with StringGRid1 do for i := 0 to RowCount - 1 do begin Rows[i].Clear; end; end; 

If you need not touch the headers, then run through the indices starting from 1.

  • This is for Delphi. Although it is not difficult to translate for the builder, it helped, thanks. - DizzWebS