[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ExtCtrls' (#lcl)

TShape

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TShape - An arbitrary graphic geometrical shape placed on the Form. It may be one of a series of standard shapes defined by TShapeType

Declaration

Source position: extctrls.pp line 264

type TShape = class(TGraphicControl) end;

protected

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  class function GetControlClassDefaultSize; override;

  

Returns the default size for this class of controls (when added to a form).

public

  constructor Create(); override;

  

Create - constructor for TShape: calls inherited Create, sets default styles and bounds, creates pen and brush

  destructor Destroy; override;

  

Destroy - destructor for TShape: frees pen and brush, then calls inherited Destroy

  procedure Paint; override;

  

Override this method with your own painting code.

  procedure StyleChanged();

  

StyleChanged - method for handling change of style by Sender

published

  property Align: TAlign;

  

Specifies the placement of the control inside its Parent.

  property Anchors: TAnchors;

  

The set of anchor definitions for this control.

  property BorderSpacing: TControlBorderSpacing;

  

Determines the inner and outer border spacing for this control.

  property Brush: TBrush; [rw]

  

The Brush to be used for colouring this shape

  property Constraints: TSizeConstraints;

  

The minimal and maximal Width and Height of this control.

  property DragCursor: TCursor;

  

The cursor shape shown while the control is dragged.

  property DragKind: TDragKind;

  

The operation when the control is dragged - Drag or Dock.

  property DragMode: TDragMode;

  

Allows the user to drag the control.

  property Enabled: Boolean;

  

Determines whether the control reacts on mouse or keyboard input.

  property ParentShowHint: Boolean;

  

If true, the value of ShowHint for the control will be the same as the one from the Parent. Default is true.

  property Pen: TPen; [rw]

  

The Pen to be used for drawing this shape

  property OnChangeBounds: TNotifyEvent;

  

Event handler for a change of the Bounds of the control.

  property OnDragDrop: TDragDropEvent;

  

This handler determines the action on an drop onto this control, in a drag-drop operation.

  property OnDragOver: TDragOverEvent;

  

Event handler for a control being dragged over this control.

  property OnEndDock: TEndDragEvent;

  

Notification handler for the end of a docking operation.

  property OnEndDrag: TEndDragEvent;

  

Notification handler for the end of a dragging operation.

  property OnMouseDown: TMouseEvent;

  

Event handler for mouse button going down.

  property OnMouseEnter: TNotifyEvent;

  property OnMouseLeave: TNotifyEvent;

  property OnMouseMove: TMouseMoveEvent;

  

Event handler for mouse movement within the control.

  property OnMouseUp: TMouseEvent;

  

Event handler for mouse button going up.

  property OnMouseWheel: TMouseWheelEvent;

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  property OnPaint: TNotifyEvent;

  

Supply your own OnPaint handler for painting the control.

  property OnResize: TNotifyEvent;

  

Notification handler for a resize of the control.

  property OnStartDock: TStartDockEvent;

  

Event handler for the start of a docking operation.

  property OnStartDrag: TStartDragEvent;

  

Event handler for the start of a dragging operation.

  property Shape: TShapeType; [rw]

  

Which Shape? (Rectangle, Square, RoundRect, RoundSquare, Ellipse, Circle, SquaredDiamond, Diamond)

  property ShowHint: Boolean;

  

Enables the Hint display.

  property Visible: Boolean;

  

Allows to show or hide the control, and all of its children.

Inheritance

TShape

  

TShape - An arbitrary graphic geometrical shape placed on the Form. It may be one of a series of standard shapes defined by TShapeType

|

TGraphicControl

  

TGraphicControl is the base class for all lightweight controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components associated with widgets.

|

TComponent

?

TObject

Description

TShape: An arbitrary graphic geometrical shape placed on the Form. It may be one of a series of standard shapes defined by TShapeType (stRectangle, stSquare, stRoundRect, stRoundSquare, stEllipse, stCircle, stSquaredDiamond, stDiamond).

It can be displayed using the Paint method and the Brush and Pen tools.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.