Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Create a Panel component with a default picture loaded from file

Posted on 2003-02-23
4
Medium Priority
?
154 Views
Last Modified: 2010-04-04
Hi
I am writing a new component descending from TPanel with the following customization:
Place a default picure loaded from file on the Panel, allowing the application developer to change the picture file. I also want to add som action to the MouseMove method when the picture is moved across the panel.
 
Can this be done by simple adding a picture field in the new panel constructor, or do I have to draw a rectangle on the panel and load the picture in here?
0
Comment
Question by:queene
3 Comments
 
LVL 2

Accepted Solution

by:
BorlandMan earned 200 total points
ID: 8006066

you can declare a field, say a TBitmap and then you
have to create an instance ( ex FPict := TBitmap.Create )
then draw it on the panel.

you will have to write some hit testing code to determine if the user is clicking on the bitmap and which way he/she is dragging it.

hth,
J

0
 

Expert Comment

by:CleanupPing
ID: 9317118
queene:
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 10

Expert Comment

by:kacor
ID: 9956084
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 BorlandMan's answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…

578 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