Page 1 of 1
Draw only after all changes?
Posted: Mon Jan 30, 2006 11:48 am
by RichEnjoyer
Hello,
if it posible that i can made any changes in a RichViewEdit component without drawing?
I want no see any changes by the programm on the screen befor i say "draw".
best wishes, Frank
Posted: Mon Jan 30, 2006 6:48 pm
by Sergey Tkachenko
In TRichViewEdit, there are two types of methods for document modifications.
1) "Viewer-style" methods, introduced in TRichView. They do not update document view until you call Format. They provide the fastest way to modify document, but these changes cannot be undone and redone by user.
After calling such method, document becomes unformatted and cannot be displayed until you call Format.
2) Editing methods, introduced in TRichViewEdit. They always reformat and redraw document. You can suppress redrawing using WM_SETREDRAW message:
Code: Select all
SendMessage(rve.Handle, WM_SETREDRAW, 0, 0);
<modifications here>
SendMessage(rve.Handle, WM_SETREDRAW, 1, 0);
rve.Invalidate;
Posted: Tue Jan 31, 2006 8:51 am
by RichEnjoyer
That's is!
Absolutly great, thanks Sergey.
When i use RichView, it this component "more faster" for output only as RichViewEdit?
Best wishes, Frank
Posted: Tue Jan 31, 2006 11:49 am
by Sergey Tkachenko
No, TRichView is not faster than TRichViewEdit (if you will use the same methods for them).
Posted: Wed Feb 01, 2006 9:27 am
by RichEnjoyer
Ok thanks for answer!