Jump to content


Photo

nextGrid and DoubleBuffered in Delphi 2010


  • Please log in to reply
2 replies to this topic

#1 Luben

Luben
  • Members
  • 116 posts

Posted 26 November 2010 - 04:21 PM

Hello,

I'm using Delphi 2010 and the latest nextGrid component and got the following problem:

1. In the form DoubleBuffered was set to True
2. There is a single nextGrid in the form, 6 columns, 20 rows.
3. When I compile and run the application and if I move the part of the form with grid behing the screen (partially) the grid becomes black (just like you dip the grid into black ink). There is no recovery - the "blakend" part of the grid stays black forever.

It took me whole day to locate the problem - in my real application I'm communicating with HID device and output the data into the Grid. The problem was that the table cells became black during the refresh. Initially I blamed the HID component (nrHID) and used PostMessage to avoid direct processing of the data from the HID component from OnReceive data event. Some things improved but the main problem persisted. At the end it came out that it's DoubleBuffered set to True.

In case you can't reproduce the problem I can send the zipped project.

I think this problem is also affecting in some cases TImage when drawing on the TImage canvas - I'll report this in Embarcadero forum. For usre something is fishy around DoubleBuffering.

Best regards
Luben

#2 AIM

AIM

    Senior Member

  • Honorable Members
  • PipPip
  • 202 posts

Posted 26 November 2010 - 05:15 PM

You can solve this by using NextGrid1.DoubleBuffered := FALSE, see also http://www.bergsoft....?showtopic=3175


#3 Luben

Luben
  • Members
  • 116 posts

Posted 26 November 2010 - 05:35 PM

Hi AIM,

Thank you for the advice - it really fixes the problem for now. I was not aware that nextGrid and other Berg components have own DoubleBuffer property.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users