Link to home
Start Free TrialLog in
Avatar of ralph78
ralph78Flag for France

asked on

graphical component

hi,
i created a component based on the TGraphicControl one, and i overrid its Paint method. now i can use this component during design time, and its behavior seems to be correct (the Paint method is correctly working). but when i try to run an app containing my component, even if the Paint method is called, nothing is displayed. could someone help me?

regards, raph
Avatar of zebada
zebada

Can you post your code?

Are you calling myControl.Invalidate whenever you change the control's data and want the control to be repainted?


Avatar of ralph78

ASKER

my code is quite easy: i just draw some texts and rectangles. and i don't call the Invalidate method: i use Repaint when the control is resized or when one or another text is changed.
Hi ralph78,

take a look at your HDD, may be there is more then one version of .DCU in search path.

------
Igor.
Try to use TCustomControl instead of TGraphic control. To make it work faster set the DoubleBuffered propety to true.
Be carefull with TCustomControl, it is difficult to make it transparent.
Avatar of ralph78

ASKER

my code is quite easy: i just draw some texts and rectangles. and i don't call the Invalidate method: i use Repaint when the control is resized or when one or another text is changed.
ASKER CERTIFIED SOLUTION
Avatar of ivobauer
ivobauer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ralph78

ASKER

i don't know what i did, but my component is working now!
thanks anyway, ralph