Common properties of components

Print Previous page Top page Next page

The properties allow to control by form and behaviour of components at creation and at execution of the application. The values setting of the most of components properties is usually executed at creation of application with the help of Object inspector.

The properties set of component is fixed and depends on a type of a component.

Below there are enumeration and assignment of common and most often met properties of components.

- Name - contains a name (identifier) of the component on which one the call to this component is made. The name will be created  automatically as follows: the number in order of location onto the form  is added  to the name of component. For example, the first Button receives a name Button1, the second - Button2 etc. Usually the developer gives to components more informative names, than names by default. It is expedient to include into name of the component the data about the component type and its assignment in the application. The name should not contain blanks, the first character should be the character or the underline.

- Caption - contain line for an inscription of  the component header. Originally receives the value from Name property.

- Height, Width - indicate accordingly vertical and horizontal sizes of the component.  

- Left, Top - define coordinates of the left upper corner of the component concerning of the container containing this component, for example, form or panel. The properties Height and Width together with Left and Top specify position and size of components.

- Auto size - is used for control by automatic correction of component sizes depending on the text of an inscription. If the value of property is equal to True the component changes the sizes according to the text that is present in Caption property.

- Ctl3D - allows to set the view of visual component. If value of property is equal to True the component has two-dimensional view, if that is equal to False - three-dimensional view (by default). 3D effect (voluminosity) is created by recess of the object concerning the container.

- Hint - sets the hint text displayed in that case when cursor is in area of the component and some time is immovable. The hint represents a field of yellow color (by default) on which the text illustrating assignment or usage of the component is displayed.

- Show hint - to display the Hint it is necessary to set True in value of property. By default the property has False value and the Hint is not displayed.

- Color - defines a background color (surface) of the component. The displayed color depends on parameters of a video-map and screen monitor, first of all, from the installed color image. For change of color the standard dialogue of color choice will be used.

- Positioning - defines variant of components alignment inside the container having this  component. More often in a role of such container the Form or Panel appears. The alignment will be used in cases when it is required that any interface element should have a definite position concerning the container having it irrespective of resizing the latter. The property (Align) can accept one of the following values:

- None - alignment is not used. By default the component is on that place where was located at development of the application.

- Left - component  displaces into the left part of container, the component's width does not vary, its height becomes equal to the height of the container.

- Top - components displaces into a top of the container, the component's height does not vary, its width becomes equal to the width of the container.

- Right - is similar to Left operation, but component displaces into a right part of the container.

- Bottom - is similar to Top operation, but component displaces into the bottom of the container.

- Client- component occupy all container.

- Font - defines parameters of the font used for a displayed text. For choice of the font the standard dialogue of font parameters choice will be used.

- Border style -  mode of overall dimensions marking of the component, the possible values: none, single (by default).

- Read only - the possibility of the information editing (by default has the False value).

- Anchors - it is intended for definition of a binding of a component to a parental component at change of the sizes of a parental component. Property has type of set:

- Top - the component is bound to the top edge of a parental component;

- Left - the component is bound to a left edge of a parental component;

- Bottom - the component is bound to the bottom edge of a parental component;

- Right - the component is bound to a right edge of a parental component.