?
Solved

Add TGraphicControl to a TCustomPanel by DesginTime and RunTime

Posted on 2003-02-27
5
Medium Priority
?
136 Views
Last Modified: 2010-04-04
I'm looking for methods to add a TGraphicControl in a TCustomPanel by DesignTime (like TToolBar).
I also wont that TGraphicControl can be selected in Design mode for see and change property's.

I'have make a TComponentEditor with a property Add. It also work i designTime but my TGrahicContol can't be selected, my TGraphicControl is note registered in the DFM, when i run my project my TGraphicControl is note i m'y CustomPanel.

Lite exemple is welcome

P.S. Sorry for my bad english

Thanks for help.
0
Comment
Question by:bvdv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
andrewjb earned 200 total points
ID: 8041051
set the TGraphicControl's Owner to be the Form rather than the custom panel

e.g.

tMyNewPanel.CreateNewGraphic;
begin
  tGraphicCOntrol.Create( Owner );  // His owner is my owner
end;


but you've got to watch out - if you can select it in the IDE, you can hit DEL and delete it.

Storing the graphic controls in a tComponentList will at least let you know when one gets destroyed...
0
 

Expert Comment

by:CleanupPing
ID: 9317037
bvdv:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 12

Expert Comment

by:andrewjb
ID: 9317204
Think I got it right!
0
 
LVL 10

Expert Comment

by:kacor
ID: 9981777
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept andrewjb's answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Merry Christmas and happy new year!

kacor
EE Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

743 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