Unit 'ExtCtrls' Package
[Overview][Types][Classes][Procedures and functions][Index] [#lcl]

TShape

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

TShape draws an arbitrary geometric shape.

Declaration

Source position: extctrls.pp line 269

type TShape = class(TGraphicControl)

protected

  class procedure WSRegisterClass; override;

  

  class function GetControlClassDefaultSize; override;

  

Gets the default size for instances of the control.

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;

  

Draws the shape for the control on its Canvas.

  procedure StyleChanged();

  

StyleChanged - method for handling change of style by Sender.

published

  property Align: TAlign;

  

Specifies the placement of the control on its Parent control.

  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 coloring this shape.

  property Constraints: TSizeConstraints;

  

Contains the minimum and maximum Width and Height for the 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 responds to 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 signalled when the Bounds for the control have been changed.

  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 drag operation.

  property OnMouseDown: TMouseEvent;

  

Event handler signalled when a mouse down event is handled for the control.

  property OnMouseEnter: TNotifyEvent;

  

Event handler signalled when the mouse pointer has entered the control.

  property OnMouseLeave: TNotifyEvent;

  

Event handler signalled when the mouse pointer has left the control.

  property OnMouseMove: TMouseMoveEvent;

  

Event handler for mouse movement within the control.

  property OnMouseUp: TMouseEvent;

  

Event handler signalled when a mouse up event is handled for the control.

  property OnMouseWheel: TMouseWheelEvent;

  

Event handler for mouse wheel turned.

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  

Event handler for downward movement of mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler for upward movement of the mouse wheel.

  property OnMouseWheelHorz: TMouseWheelEvent;

  

Event handler for horizontal movements of the mouse wheel.

  property OnMouseWheelLeft: TMouseWheelUpDownEvent;

  

Event handler signalled for left mouse wheel movements.

  property OnMouseWheelRight: TMouseWheelUpDownEvent;

  

Event handler signalled for right mouse wheel movements.

  property OnPaint: TNotifyEvent;

  

Event handler signalled to paint 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]

  

Indicates the geometric shape drawn in the control.

  property ShowHint: Boolean;

  

Enables Hint display for the control.

  property Visible: Boolean;

  

Allows the control, and all of its children, to be displayed or hidden.

end;

Inheritance

TShape

  

TShape draws an arbitrary geometric shape.

|

TGraphicControl

  

TGraphicControl is the base class for all lightweight controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

|

TObject

Description

TShape is a TGraphicControl descendant used to draw an arbitrary geometric shape. It may be one of a series of standard shapes defined in the TShapeType enumeration.

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

See also

TShapeType

  

TShapeType is an enumerated type with values representing standard geometric shapes.



CT Web help

CodeTyphon Studio