1. Home
  2. Computing & Technology
  3. Delphi Programming

Drop Multiple Instances of a Component on a Delphi Form

By Zarko Gajic, About.com

When designing your application interface, you generally add several components from the Component/Tool Palette on a form and set their properties.

To add a component to an open form, double-click it, then set its properties and code its event handlers.

More than one Button, please!

In complex designs, where you need to place several instances of the same component on a form, you might want to speed the process of adding component:
  1. Locate the component on the component / tool palette,
  2. Hold down the Shift key and click on the component,
  3. Let go the Shift key,
  4. Repeatedly click on the form to place instances of the component. With each click you "drop" a new instance,
  5. Click the arrow button on the tool palette when you are finished.

Note: if you just dropped 10 TLabel's - you can select all of them by holding the Shift key while clicking on every label. When all are selected, change the Font property for all the selected labels by simply editing the Font property using the Object Inspector.

Delphi tips navigator:
» Array as a Function Return Type and Method Parameter
« How to Select a Control Parent in the Delphi Form Designer

More Delphi Programming Quick Tips
Zarko Gajic
Guide since 1998

Zarko Gajic
Delphi Programming Guide

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. Delphi 2007 Tips
  7. How to Drop Multiple Instances of a Component on a Delphi Form

©2009 About.com, a part of The New York Times Company.

All rights reserved.