Standard Components and Properties

The Tool Palette window has a Standard category that contains components often used in VCL Forms applications. Among these are three components that are most often used: TLabel, TButton, and TEdit.

Each of these components has a very important job. TLabel is one of the simplest components and is used to display text on the form. The TLabel component is most often used to provide a name for a component that can't display its name on the form.

The purpose of the TButton component is to provide the user with a way of executing a piece of code. The TEdit component represents the standard text box and enables the user to enter some text.

The most important property of every component is the Name property. It is used in code to refer to the component.

Visual components like TLabel, TEdit, and TButton are also called controls. Controls are derived from the TControl class and have several standard properties that define their appearance on the form. The Top and Left properties define the position of the control, and the Width and Height properties define the size of the control.

Controls also have two standard properties that describe their functionality: Enabled and Visible. The Enabled property determines if the control can respond to events or execute code, and the Visible property determines if the control appears onscreen.

Inside Delphi 2006
Inside Delphi 2006 (Wordware Delphi Developers Library)
ISBN: 1598220039
EAN: 2147483647
Year: 2004
Pages: 212
Authors: Ivan Hladni

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: