Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

graphical component

Posted on 2001-07-09
8
Medium Priority
?
186 Views
Last Modified: 2010-08-05
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
Comment
Question by:ralph78
8 Comments
 
LVL 6

Expert Comment

by:zebada
ID: 6263997
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
 

Author Comment

by:ralph78
ID: 6264081
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
 
LVL 9

Expert Comment

by:ITugay
ID: 6264202
Hi ralph78,

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

------
Igor.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:Buda
ID: 6264217
Try to use TCustomControl instead of TGraphic control. To make it work faster set the DoubleBuffered propety to true.
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6264241
Be carefull with TCustomControl, it is difficult to make it transparent.
0
 

Author Comment

by:ralph78
ID: 6264334
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
 
LVL 2

Accepted Solution

by:
ivobauer earned 200 total points
ID: 6264666
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
 

Author Comment

by:ralph78
ID: 6264755
i don't know what i did, but my component is working now!
thanks anyway, ralph
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Integration Management Part 2
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question