Difference between revisions of "Component Palette"

From Lazarus wiki
Jump to navigationJump to search
Line 1: Line 1:
{{Component Palette}}
+
<noinclude>{{Component Palette}}</noinclude>
 +
The '''Component Palette''' of the IDE is a tabbed toolbar which displays a large number of icons representing commonly used components for building Forms.
 +
 
 +
A Tabbed toolbar which displays a large number of icons representing commonly used components for building Forms.
 +
 
 +
Each tab causes the display of a different set of icons, representing a functional group of components.  The left-most icon in each tabbed group is an obliquely leftward-facing arrow, called the Selection Tool.
 +
 
 +
If you allow the mouse cursor to hover over any of the icons on the Component Palette, without clicking on the icon, the title of that component will pop-up.  Note that each title begins with a 'T' - this signifies 'Type' or more accurately 'Class' of the component.  When you select a component for inclusion in a form, the [[Class]] is added to the ''' [[Type|type]] '''  section of the  ''' [[Interface|interface]] '''  part of the [[Unit]] (usually as part of the overall TForm1), and an  ''' instance '''  of that class is added to the  ''' [[Var|var]] '''  section (usually as the variable Form1).  Any  ''' Methods '''  that you design to be used by the Form or its Components (ie [[Procedure]]s or [[Function]]s) will be placed in the  ''' [[Implementation|implementation]] '''  part of the Unit.
 +
 
 +
==== How To Use the Palette ====
 +
To use the Palette, there must be an open form on view in the editor (if there isn't one, select File -> New Form). Click on the icon in the appropriate tab of the Palette for the component you want to use, then click on the Form, near where you want the component to appear. When the desired component appears, you can select it by clicking with the mouse. Once selected on the form, the object is also selected in the Object Inspector window, where you can edit its properties and events.
 +
 
 +
Adjustments to the visual appearance of an object can be made either by altering the picture itself on the Form using the mouse, or by changing the relevant Property in the Object Editor for that component.
 +
 
 +
If you install additional components, either those you have written yourself, or some coming as a package from some other source, then extra tabs with the relevant icons will appear in your Component Palette. These new components can be selected and used on your forms in the same way as those supplied by default.
 +
 
 +
In the following list of the Components, you will find links to files that contain descriptions of the Units in which they are found.  If you want to find out about the properties of a particular component, it is often worth looking at the Inheritance of that component and then inspecting the properties of the base type from which it is derived.  For example, to understand TMaskEdit it is also useful to examine TCustomMaskEdit.
 +
 
  
The '''Component Palette''' of the IDE is a tabbed toolbar which displays a large number of icons representing commonly used components for building Forms.
 
 
[[Image:Component_Palette_Standard.png]]
 
[[Image:Component_Palette_Standard.png]]
 
* [[Standard tab|Standard]]
 
* [[Standard tab|Standard]]

Revision as of 00:10, 8 March 2017

English (en) suomi (fi) français (fr) 日本語 (ja) русский (ru)
The Component Palette of the IDE is a tabbed toolbar which displays a large number of icons representing commonly used components for building Forms.

A Tabbed toolbar which displays a large number of icons representing commonly used components for building Forms.

Each tab causes the display of a different set of icons, representing a functional group of components. The left-most icon in each tabbed group is an obliquely leftward-facing arrow, called the Selection Tool.

If you allow the mouse cursor to hover over any of the icons on the Component Palette, without clicking on the icon, the title of that component will pop-up. Note that each title begins with a 'T' - this signifies 'Type' or more accurately 'Class' of the component. When you select a component for inclusion in a form, the Class is added to the type section of the interface part of the Unit (usually as part of the overall TForm1), and an instance of that class is added to the var section (usually as the variable Form1). Any Methods that you design to be used by the Form or its Components (ie Procedures or Functions) will be placed in the implementation part of the Unit.

How To Use the Palette

To use the Palette, there must be an open form on view in the editor (if there isn't one, select File -> New Form). Click on the icon in the appropriate tab of the Palette for the component you want to use, then click on the Form, near where you want the component to appear. When the desired component appears, you can select it by clicking with the mouse. Once selected on the form, the object is also selected in the Object Inspector window, where you can edit its properties and events.

Adjustments to the visual appearance of an object can be made either by altering the picture itself on the Form using the mouse, or by changing the relevant Property in the Object Editor for that component.

If you install additional components, either those you have written yourself, or some coming as a package from some other source, then extra tabs with the relevant icons will appear in your Component Palette. These new components can be selected and used on your forms in the same way as those supplied by default.

In the following list of the Components, you will find links to files that contain descriptions of the Units in which they are found. If you want to find out about the properties of a particular component, it is often worth looking at the Inheritance of that component and then inspecting the properties of the base type from which it is derived. For example, to understand TMaskEdit it is also useful to examine TCustomMaskEdit.


Component Palette Standard.png

Using the menu [Tools|Options] or Crtl-Shift-O it is possible to change layout and visibility of the component palette items.

IDE Options - Environment - Component Palette.png