Board index » cppbuilder » TStringGrid Screen Updates
Barry
![]() CBuilder Developer |
Barry
![]() CBuilder Developer |
TStringGrid Screen Updates2006-08-21 09:12:28 PM cppbuilder57 I am using TStringGrid for a project (actually, I am trying TAdvStringGrid from TMS Software). It seems to be working OK, but I am having a problem with screen updates. After filling some cells with data, colors, etc, I need to force an immediate update before proceeding, but these updates lag way too long. I have been issuing a call to Update() for my form, but this doesn't seem to have an effect. Any ideas on where to look? |
Thorsten Kettner
![]() CBuilder Developer |
2006-08-21 10:58:46 PM
Re:TStringGrid Screen Updates
"Barry" < XXXX@XXXXX.COM >wrote:
QuoteI am using TStringGrid for a project (actually, I am trying |
Barry
![]() CBuilder Developer |
2006-08-21 11:25:15 PM
Re:TStringGrid Screen Updates
"Thorsten Kettner" < XXXX@XXXXX.COM >wrote:
Quote
This system is an automatic hardware tester. The grid contains a sequence of tests to be performed. After I initialize the Grid with startup data, the auto-sequencing function is called from the idle loop Application->OnIdle = MyIdleHandler; If I am in a running state, My IdleHandler contains a line RunAutoProcess(). to do my thing. As I finish each test, I "fill in the grid" fields with data and then scroll up the grid to show the next test line with AutoTestDataGrid->TopRow += 1; followed by AutoTestDataGrid->Repaint(); The changing grid data display works fine, except for the scrolling. When I have finished the 50 test points, I can manually scroll using the scrollbar just fine. I have tried Repaint(), Invalidate(), Update() with no success. {smallsort} |
Thorsten Kettner
![]() CBuilder Developer |
2006-08-22 02:19:37 PM
Re:TStringGrid Screen Updates
"Barry" < XXXX@XXXXX.COM >wrote:
QuoteAutoTestDataGrid->TopRow += 1; the grid. (I.e. maybe Repaint *sends* a message whereas setting TopRow only *posts* a message, hence the delay). |
Barry
![]() CBuilder Developer |
2006-08-22 07:49:53 PM
Re:TStringGrid Screen Updates
"Thorsten Kettner" < XXXX@XXXXX.COM >wrote:
Quote
ProcessMessages() call. I did this with my own function Wait(0.5), which waits 1/2 second with a Windows timer based wait loop (do nothing until get a timer tick). This worked much better, but significantly increases my processing time when I have a lot of test points. I am next trying a Grid->BeginUpdate and Grid->EndUpdate pair of calls, which is unique to TMS's TAdvStringGrid. I'll let you know how it works. |
Barry
![]() CBuilder Developer |
2006-08-22 11:08:06 PM
Re:TStringGrid Screen Updates
"Barry" < XXXX@XXXXX.COM >wrote:
Quote
updating my grid as I go along. |