[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ExtCtrls' (#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;

  

Registers this component class with the current WidgetSet.

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

  property DragKind: TDragKind;

  

Indicates the action performed for a drag operation: drag-and-drop or drag-and-dock.

  property DragMode: TDragMode;

  

Determines how a drag operation is started for 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;

  

Event handler signalled when an object is dropped onto the control.

  property OnDragOver: TDragOverEvent;

  

Event handler signalled when a control is dragged over the control instance.

  property OnEndDock: TEndDragEvent;

  

Event handler signalled for the end of a drag-dock operation.

  property OnEndDrag: TEndDragEvent;

  

Event handler signalled for the end of a drag-drop 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 signalled when the mouse pointer is moved in 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 signalled for a downward movement of the mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler signalled for an upward movement of the mouse wheel.

  property OnMouseWheelHorz: TMouseWheelEvent;

  

Event handler signalled for a horizontal movement of the mouse wheel.

  property OnMouseWheelLeft: TMouseWheelUpDownEvent;

  

Event handler signalled for a leftward movement of the mouse wheel.

  property OnMouseWheelRight: TMouseWheelUpDownEvent;

  

Event handler signalled for a rightward movement of the mouse wheel.

  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 signalled 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

  

The base class for LCL components which have an associated widget.

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

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.


Version 3.2 Generated 2024-02-25 Home