• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

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
0
ralph78
Asked:
ralph78
1 Solution
 
zebadaCommented:
Can you post your code?

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


0
 
ralph78Author Commented:
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.
0
 
ITugayCommented:
Hi ralph78,

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

------
Igor.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
BudaCommented:
Try to use TCustomControl instead of TGraphic control. To make it work faster set the DoubleBuffered propety to true.
0
 
ITugayCommented:
Be carefull with TCustomControl, it is difficult to make it transparent.
0
 
ralph78Author Commented:
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.
0
 
ivobauerCommented:
Hi Ralph78!

When you run the sample project, your control is created programatically at run-time or it was dropped onto the form at design-time? Neverthless, it would be nice to see the component & sample project source if possible.

Best regards, Ivo.
0
 
ralph78Author Commented:
i don't know what i did, but my component is working now!
thanks anyway, ralph
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now