Board index » delphi » canceling paint method

canceling paint method

is there a way to prefent a paint method
being executed on the change of a control?

I only want the control to be repainted
on my command....

  thanx in advance,
   Marc

 

Re:canceling paint method


All you need to do is override the wm_paint message of the control by
creating a wmpaint method.  In the paint method, call inherited only when
the circumstances are right for the paint to occur...  You could establish a
property of the control to override the paint and check the property in the
wmpaint method.

Jason Southwell
Delphi 3.0 c/s Certified Developer

Quote
j.m.maurer wrote in message <3690BDAA.C4AFA...@student.utwente.nl>...
>is there a way to prefent a paint method
>being executed on the change of a control?

>I only want the control to be repainted
>on my command....

>  thanx in advance,
>   Marc

Re:canceling paint method


I've found that overriding the paint method doesn't work in all cases.  In
fact, in my testing, the paint method doesn't get called in most cases.

Jason Southwell
Delphi 3.0 c/s Certified Developer

Quote
Rick Rogers (TeamB) wrote in message

<3690da05.8442...@forums.borland.com>...
Quote
>On Mon, 4 Jan 1999 06:44:34 -0800, "Jason Southwell"
><jsouthw...@componentcontrol.com> wrote:

>> All you need to do is override the wm_paint message of the control by
>> creating a wmpaint method.

>Not really. What you'd do is override the Paint method (declared
>virtual in TControl).

>--
>Rick Rogers (TeamB) | Fenestra Technologies
>http://www.fenestra.com/

Re:canceling paint method


On Mon, 4 Jan 1999 06:44:34 -0800, "Jason Southwell"

Quote
<jsouthw...@componentcontrol.com> wrote:
> All you need to do is override the wm_paint message of the control by
> creating a wmpaint method.

Not really. What you'd do is override the Paint method (declared
virtual in TControl).

--
Rick Rogers (TeamB) | Fenestra Technologies
http://www.fenestra.com/

Re:canceling paint method


On Mon, 4 Jan 1999 07:09:10 -0800, "Jason Southwell"

Quote
<jsouthw...@componentcontrol.com> wrote:
>  In fact, in my testing, the paint method doesn't get called
> in most cases.

Post a small example which demonstrates this.

--
Rick Rogers (TeamB) | Fenestra Technologies
http://www.fenestra.com/

Other Threads