Print Page | Close Window

redraw problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=3600
Printed Date: 18 May 2024 at 1:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: redraw problem
Posted By: douglashogan
Subject: redraw problem
Date 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



Replies:
Posted By: sserge
Date Posted: 04 February 2006 at 7:13am
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


Posted By: douglashogan
Date Posted: 04 February 2006 at 7:44am

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


Posted By: sserge
Date Posted: 04 February 2006 at 10:30am
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net