Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Component Does not repaint?

Status
Not open for further replies.

Wings

Programmer
Feb 14, 2002
247
US
Hi,
I have created a component based on TCustomControl.
The component repaints itself properly until, another window partly obscures it. When this happens, whatever part of the component that was obscured will not repaint itself and it is distrorted until I do something that specifically calls the repaint function, eg: click it.
I've run into this problem before but I can't remember how I fixed it, I know its and easy fix.

Any help is appreciated

Thanks
 
Hi,

Ill try to help you until someone know a better way to do it...

To avoid it you can edit the OnPaint method of the form that own your object. In OnPaint (of the form), call the method that paint your object and it should work fine.

jb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top