|
How to Create the Basic Unit For a New Component
From your Delphi Programming Guide
Steps to crating a new (graphics) component from TImage. Or, in other words, how to create a new component from an existing one.
Difficulty Level:
Easy
Time Required:
5 minutes
Here's How:
- Start Delphi and select File | New ...
- Double-click the Component icon in the Object Repository.
- The 'New Component' dialog box is displayed.
- Use the drop-down list to select a base class (Ancestor type).
- Select TImage.
- Type the name of your new component's class in the Class Name field. Type TPictureClip (or some other name)
- Select the Component palette location in which you want to place this derived component. Select 'Samples'.
- Click on OK.
- The Code Editor appears and displays a new source code unit.
- Save the unit as PictureClip.pas.
- You are now ready to code you own TPictureClip component.
Related Information:
More How To's from your Guide to Delphi Programming
Put this How To on your PDA!
|