BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delay Timage repaint

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Red
Guest





PostPosted: Wed Sep 01, 2004 1:31 pm    Post subject: Delay Timage repaint Reply with quote



Is there some way to tell a TImage *not* to repaint for a time? I
want to move several components over top of it, and when I'm done,
I'll call a repaint manually. I looked for something like a
"BeingUpdate" / "EndUpdate" sort of thing but here's nothing like
that. The lines of code to move the objects will be in a single
thread and there will be no "Application.ProcessMessages" amongst
them.

Thanks in advance.
Back to top
Nils Haeck
Guest





PostPosted: Wed Sep 01, 2004 2:14 pm    Post subject: Re: Delay Timage repaint Reply with quote



I don't know of any simple way. But you can create your own custom TImage
control descendant and then override the Paint method, and put a line like
"if IsUpdating then exit" in it.

Nils

"Red" <nospam_kandw321 (AT) icrossroads (DOT) com> wrote

Quote:
Is there some way to tell a TImage *not* to repaint for a time? I
want to move several components over top of it, and when I'm done,
I'll call a repaint manually. I looked for something like a
"BeingUpdate" / "EndUpdate" sort of thing but here's nothing like
that. The lines of code to move the objects will be in a single
thread and there will be no "Application.ProcessMessages" amongst
them.

Thanks in advance.



Back to top
Yannis
Guest





PostPosted: Wed Sep 01, 2004 2:20 pm    Post subject: Re: Delay Timage repaint Reply with quote



[email]nospam_kandw321 (AT) icrossroads (DOT) com[/email] (Red) wrote in news:4135ce69.6765918
@newsgroups.borland.com:

Quote:
Is there some way to tell a TImage *not* to repaint for a time? I
want to move several components over top of it, and when I'm done,
I'll call a repaint manually. I looked for something like a
"BeingUpdate" / "EndUpdate" sort of thing but here's nothing like
that. The lines of code to move the objects will be in a single
thread and there will be no "Application.ProcessMessages" amongst
them.

Thanks in advance.

How about

Form.Canvas.lock;
try
// do what ever
finally
Form.Canvas.Unlock;
Form.Refresh;
end;

Regards.
--
Yannis Kozikopoulos
Software Engineer
Market Data & Analysis
------------------------------------------------------
PROFILE S. A.
Sigrou Av 199, 171 21 Athens
Phone: +30 210 9301200, Fax: +30 210 9301222
e-mail: **********************
www.profile.gr

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.