[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 254

type TShape = class(TGraphicControl)

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;

  

Specifies the placement of the control inside its Parent.

  property Anchors;

  

The set of anchor definitions for this control.

  property BorderSpacing;

  

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;

  

The minimal and maximal Width and Height of this control.

  property DragCursor;

  

The cursor shape shown while the control is dragged.

  property DragKind;

  

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

  property DragMode;

  

Allows the user to drag the control.

  property Enabled;

  

Determines whether the control reacts on mouse or keyboard input.

  property ParentShowHint;

  

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;

  

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

  property OnDragDrop;

  

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

  property OnDragOver;

  

Event handler for a control being dragged over this control.

  property OnEndDock;

  

Notification handler for the end of a docking operation.

  property OnEndDrag;

  

Notification handler for the end of a dragging operation.

  property OnMouseDown;

  

Event handler for mouse button going down.

  property OnMouseMove;

  

Event handler for mouse movement within the control.

  property OnMouseUp;

  

Event handler for mouse button going up.

  property OnPaint;

  

Supply your own OnPaint handler for painting the control.

  property OnResize;

  

Notification handler for a resize of the control.

  property OnStartDock;

  

Event handler for the start of a docking operation.

  property OnStartDrag;

  

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;

  

Enables the Hint display.

  property Visible;

  

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

end;

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.