redraw problem |
Post Reply |
Author | |
douglashogan
Groupie Joined: 02 July 2003 Location: Switzerland Status: Offline Points: 62 |
Post Options
Thanks(0)
Posted: 04 February 2006 at 6:40am |
I change the text in one of the cells of the report control using SetValue, it doesn't redraw automatically. I currrently have to call redrawwindow for the entire control to update it. What am i doing wrong? Also, I would like to embed a custom draw gauge control in a cell. Is this possible? If so, are there any examples of similar. |
|
Regards
Douglas Hogan |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
It's not incorrect behavior. Imagine that you'd like to change a number of report control cells values in a loop. If it would be automatically redrawn, you'll see a heavy flickering. So, to avoid that a user has a choice when to call Redraw method. Yes, of course it is possible to make custom drawn items. You'll have to derive your class from CXTPReportRecordItem and write custom implementation for Draw() method and some others (like mouse events handlers, etc). -- WBR, Serge |
|
douglashogan
Groupie Joined: 02 July 2003 Location: Switzerland Status: Offline Points: 62 |
Post Options
Thanks(0)
|
Thanks for the reply, But why do I have to redraw the ENTIRE control. I just want to invalidate the cell. I have a % indicator which grows as a download proceeds. There are tons of messages coming in and redrawing the entire control every time i get an update message is very inefficient. Is there no way to invalidate/redraw a single cell? |
|
Regards
Douglas Hogan |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Douglas,
There are no ways to redraw a single cell, but the entire operation is optimized internally. However, if redrawing a control on every your custom message looks inefficient for you, try using some kind of a workaround - for example redraw a control N times per second by timer, what definitely will be fast enough with reasonable N (5 for example). -- WBR, Serge |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |