Class TUIRectangularControl

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TUIRectangularControl = class(TUIControl)

Description

TUIControl that has a position and takes some rectangular space on the container.

The position is controlled using the Left, Bottom fields. The rectangle where the control is visible can be queried using the Rect virtual method.

Note that each descendant has it's own definition of the size of the control. E.g. some descendants may automatically calculate the size (based on text or images or such placed within the control). Some descendants may allow to control the size explicitly using fields like Width, Height, FullSize. Some descendants may allow both approaches, switchable by property like TCastleButton.AutoSize or TCastleImageControl.Stretch.

Hierarchy

Overview

Methods

Protected procedure DefineProperties(Filer: TFiler); override;
Public function Rect: TRectangle; virtual; abstract;
Public procedure AlignHorizontal( const ControlPosition: TPositionRelative = prMiddle; const ContainerPosition: TPositionRelative = prMiddle; const X: Integer = 0);
Public procedure AlignVertical( const ControlPosition: TPositionRelative = prMiddle; const ContainerPosition: TPositionRelative = prMiddle; const Y: Integer = 0);
Public procedure Center;

Properties

Published property Left: Integer read FLeft write SetLeft stored false default 0;
Published property Bottom: Integer read FBottom write SetBottom default 0;

Description

Methods

Protected procedure DefineProperties(Filer: TFiler); override;
 
Public function Rect: TRectangle; virtual; abstract;

Position and size of this control, assuming it exists. This must ignore the current value of the GetExists method and Exists property, that is: the result of this function assumes that control does exist.

Public procedure AlignHorizontal( const ControlPosition: TPositionRelative = prMiddle; const ContainerPosition: TPositionRelative = prMiddle; const X: Integer = 0);

Position the control with respect to the container by adjusting Left.

Public procedure AlignVertical( const ControlPosition: TPositionRelative = prMiddle; const ContainerPosition: TPositionRelative = prMiddle; const Y: Integer = 0);

Position the control with respect to the container by adjusting Bottom.

Public procedure Center;

Center the control within the container both horizontally and vertically.

Properties

Published property Left: Integer read FLeft write SetLeft stored false default 0;
 
Published property Bottom: Integer read FBottom write SetBottom default 0;
 

Generated by PasDoc 0.13.0 on 2014-04-30 22:06:45