Solved

Flicker in DBRichedit

Posted on 2000-05-12
9
438 Views
Last Modified: 2010-04-04
Hi,

I am using a DBRichEdit component. When you exit the component the table refreshes.

When there is more text in the component than is visible and you exit the control, the component has a bad flicker.

Thanks for any help.

John
0
Comment
Question by:JohnE
9 Comments
 
LVL 4

Accepted Solution

by:
BoRiS earned 100 total points
ID: 2804002
JohnE

There are various ways to hide the flicker here are a couple and I'm sure you'll get a couple more in other comments... ;-)

LockWindowUpdate();//the easiest not always the best
InValidateRect();//very good, detailed
trap the WM_NCPAINT or WM_ERASEBKGND messages//more or likely the best, hard

Later
BoRiS
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2804060
Why not disable the DBRichEdit before you start the update and then enable it when you've finished

The Neil =:)
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 2804101
JohnE

Or you could always just call

DbRichEdit1.Invalidate;

Later
BoRiS
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 13

Expert Comment

by:Epsylon
ID: 2804197
See what happens when you set TDBRichEdit.DoubleBuffered to true...
0
 
LVL 10

Expert Comment

by:ptmcomp
ID: 2806002
This are all just workarounds. If you want to fix this problem, you have to subclass the TRichEdit and fix the parts where the VCL implementation causes flickering. (That's of course EraseBknd, window style, message handlers and so on..). I've the whole solution at work but there something like a copyright, so I can't paste the implementation here. (It also supports Richedit2 and 3 standards and even the TOM interface.) I thought of selling it. If there are enough people that want to buy it, it where possible to sell it (for a few dollars).
Regards, ptm.
0
 

Author Comment

by:JohnE
ID: 2807865
Hi all,

Thanks for your suggestions and information. As it turns out, I removed the refresh from the onexit procedure and the flicker stopped and the data is still being updated in the table. This did not occur when I was using BDE, but I am now using DBISAM as a BDE replacement and it works fine.

Although the answer didn't come from the comments, I have learned about some new areas. So, on the basis of first reply, I'll give the points to Boris.

Thanks again,

John
0
 

Author Comment

by:JohnE
ID: 2807867
Hi all,

Thanks for your suggestions and information. As it turns out, I removed the refresh from the onexit procedure and the flicker stopped and the data is still being updated in the table. This did not occur when I was using BDE, but I am now using DBISAM as a BDE replacement and it works fine.

Although the answer didn't come from the comments, I have learned about some new areas. So, on the basis of first reply, I'll give the points to Boris.

Thanks again,

John
0
 

Author Comment

by:JohnE
ID: 2807870
Hi all,

Thanks for your suggestions and information. As it turns out, I removed the refresh from the onexit procedure and the flicker stopped and the data is still being updated in the table. This did not occur when I was using BDE, but I am now using DBISAM as a BDE replacement and it works fine.

Although the answer didn't come from the comments, I have learned about some new areas. So, on the basis of first reply, I'll give the points to Boris.

Thanks again,

John
0
 

Author Comment

by:JohnE
ID: 2807872
Sorry about the multiple posts - trouble with my connection.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question