Visit our Sponsor   Visit our Sponsor
delphi3000.com - the free delphi knowledge platform
delphi3000.com - the free delphi knowledge platform
500 Users Online NOW
Have a look at your member-status

connecting people's knowledge


  - Recent ArticlesRSS feed for Recent Articles on delphi3000.com
  - List of All Articles
  - Top Viewed Articles
  - Articles (+Attachem.)
  - Articles Of Interest
  - Categories
  - Top Uploader
  - Search
  - Index

  - My Home
  - Submit an Article
  - My Articles
  - My Personal Data
  - My Bookmarks
  - Activities
  - Login/Logout

  - Sign Up
  - Why Sign Up
  - Newsletter

  - Press
  - Advertise

  - Contact
  - Feedback





Community
Borland
ClubeDelphi
Dr. Bob
UK-BUG
Delphi Meetings
Planeta Delphi



Loremo - the 1.5 liter car coming in 2009




Startblatt.de






Share this article with friendsShare this article with friends
Rate this articleRate this article - to keep the quality of delphi3000.com !
Comment this article or read through previous comments (2)


Component templatesFormat this article printer-friendly!Bookmark function is only available for registered users!
cool feature of Delphi IDE
Product:
Delphi 5.x (or higher)
Category:
VCL-General
Skill Level:
Scoring:
Last Update:
04/26/2002
Search Keys:
delphi delphi3000 article borland vcl code-snippet component template component-template component-templates components templates components-templates
Times Scored:
4
Visits:
2308
Uploader: Eber Irigoyen
Company: BTXSys
Reference: N/A
 
Question/Problem/Abstract:
do you usually drop a TDatabase component, associated with a TTable and a query... or a TEdit associated with a TButton... or some components that you usually put togheter in some of your projects?...
Answer:



well... there's a very cool feature in Delphi that allows you to put togheter some Components (EVEN WITH THE CODE OF THE EVENTS!), so that you can reuse them all later with a single click, like dropping one component, but it will drop the group of components (TEMPLATE) in your form

here's how:

1 - In Delphi, start a new application
2 - Drop as many components as you want on the main form, and set their properties and/or events
3 - Select all the components that you want on your template
4 - Choose from the Delphi menu Component | Create Component Template
5 - Specify a name for your template , as a Delphi rule you may want to keep the "T" at the beginning of the name and change the rest to whatever you want
6 - Specify the Palette page where you want your new template to be, if you put a non existant palette page, Delphi will create a new one for you
7 - Delphi even lets you assign a new icon for your template
8 - Click OK

You're set!!

you just created a template which appears on the palette of components, and you can drop on a form as many times as you want and they will be linked (like if you chose a TTable linked to a TDatabase) as you specified, and will have all the code that you put on the events, all with a single click

Delphi is awesome, isn't?

Works on Delphi5, I don't know about earlier versions

salu2

EberSys





Please rate this article!
Skill level:
BeginnerExpert

Useful:
No!Very!

Overall rating:
PoorExcellent



Comments to this article
Write a new comment
Missed Step
    Gregory Liss (Apr 25 2002 1:21PM)

Prior to selecting 'Create Component Template', you must select all components that will belong to the new template.
Respond

RE: Missed Step
Eber Irigoyen (Apr 26 2002 7:23AM)

=o)... brain failure... is updated now
thanks

EberSys
Respond














 
Sign up to consume product discounts for Bronze memberships !

read more


  Visit our Sponsor

 

  Community Ad of
E. DSpirito
 
   














 







     
  Copyright © 2000 - 2007 delphi3000.com - All rights reserved. Terms of use. || Privacy
delphi3000.com is a service by bluestep.com IT-Services GmbH (Vienna)