YOUSEFUL / DELPHI / COMPONENTS

TAtlasActionTile

A coloured, clickable tile that shows and executes an action; Enter and Space activate it.

Visual control Palette: Atlas Unit Atlas.Layout · Inherits TCustomControl · Product Atlas VCL

Description

A 160 x 100 tile painted in Color with its caption word-wrapped and centred near the top, 12 pixels in from the edges. Bind it to an action and it takes the caption, enabled state and click behaviour from it; a disabled tile draws its text in clGrayText. It is a tab stop, and Enter or Space clicks it when it has the focus, but it draws no focus rectangle. TAtlasThemer paints tiles in the theme's primary colour with white text. TAtlasTileBoard creates tiles for you. Not implemented: images, badges or counters, sizes other than the one you set, and live or animated content.

Members

MemberKindWhat it does
CreateconstructorCreates a 160 x 100 tile with Color = $00876524, a white 12-point font, a hand cursor and TabStop = True.
ActionpropertyThe action shown and executed by the tile (standard VCL action link).
CaptionpropertyText on the tile; taken from the action when one is assigned.
ColorpropertyTile background.
FontpropertyCaption font; white 12-point by default.
ParentFontpropertyStandard VCL property: use the parent's font.
EnabledpropertyA disabled tile ignores clicks and keys and draws its caption in clGrayText; follows the action.
OnClickeventFired by a mouse click and by Enter or Space.
AlignpropertyStandard VCL alignment in the parent.
AnchorspropertyStandard VCL anchors.
TabStoppropertyTrue by default, so the tile can be reached with Tab.

Constructors

Create constructor

constructor Create(AOwner: TComponent); override;

Creates a 160 x 100 tile with Color = $00876524, a white 12-point font, a hand cursor and TabStop = True.

Properties

Action property

property Action;

The action shown and executed by the tile (standard VCL action link).

Caption property

property Caption;

Text on the tile; taken from the action when one is assigned.

Color property

property Color;

Tile background.

Font property

property Font;

Caption font; white 12-point by default.

ParentFont property

property ParentFont;

Standard VCL property: use the parent's font.

Enabled property

property Enabled;

A disabled tile ignores clicks and keys and draws its caption in clGrayText; follows the action.

Align property

property Align;

Standard VCL alignment in the parent.

Anchors property

property Anchors;

Standard VCL anchors.

TabStop property

property TabStop;

True by default, so the tile can be reached with Tab.

Events

OnClick event

property OnClick;

Fired by a mouse click and by Enter or Space. With an action assigned, a click executes the action; if you also assign a different OnClick handler, that handler runs instead of the action.

Examples

A single tile

A larger tile that runs an existing action.

pascal
uses System.Classes, Vcl.Controls, Vcl.ActnList, Atlas.Layout;

function AddReportTile(Owner: TComponent; Parent: TWinControl; Action: TAction): TAtlasActionTile;
begin
  Result := TAtlasActionTile.Create(Owner);
  Result.Parent := Parent;
  Result.SetBounds(16, 16, 200, 120);
  Result.Action := Action; // caption, enabled state and execution come from the action
end;

TAtlasTileBoard · TAtlasCommandBar · TAtlasThemer

Also in Atlas VCL

TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer