Solved

Flicker in DBRichedit

Posted on 2000-05-12
9
434 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
 
LVL 13

Expert Comment

by:Epsylon
ID: 2804197
See what happens when you set TDBRichEdit.DoubleBuffered to true...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now