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

TPaintBox

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

Implements a control with a rectangular drawing area using a given Font and Color.

Declaration

Source position: extctrls.pp line 449

type TPaintBox = class(TGraphicControl)

protected

  class procedure WSRegisterClass; override;

  

  procedure Paint; override;

  

Draws the content for the control.

  class function GetControlClassDefaultSize; override;

  

Gets the default size used for new instances of the class.

public

  constructor Create(); override;

  

Constructor for the class instance.

  property Canvas: TCanvas;

  

A clipped window into the parent Canvas.

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 Color: TGraphicsColor;

  

The background color of the control.

  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 DragMode: TDragMode;

  

Allows the user to drag the control.

  property Enabled: Boolean;

  

Determines whether the control responds to mouse or keyboard input.

  property Font: TFont;

  

The font to be used for text display in this control.

  property Hint: string;

  

The text to show in the Hint window for the control.

  property ParentColor: Boolean;

  

Use the Color from the Parent control, when enabled.

  property ParentFont: Boolean;

  

If True, the Font of the control will be the same as the one from the Parent. Default is True.

  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 PopupMenu: TPopupMenu;

  

A context-sensitive menu that pops up when the right mouse button is clicked over this 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.

  property OnChangeBounds: TNotifyEvent;

  

Event handler signalled when the Bounds for the control have been changed.

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnContextPopup: TContextPopupEvent;

  

Invoked when a context-sensitive pop-up menu is requested.

  property OnDblClick: TNotifyEvent;

  

Event Handler for double mouse clicks.

  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 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 OnStartDrag: TStartDragEvent;

  

Event handler for the start of a dragging operation.

end;

Inheritance

TPaintBox

  

Implements a control with a rectangular drawing area using a given Font and Color.

|

TGraphicControl

  

TGraphicControl is the base class for all lightweight controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

|

TObject

Description

TPaintBox is a TGraphicControl descendant which implements a control with a rectangular drawing area using a given Font and Color. Like its ancestor, TPaintBox provides a Canvas which is used to draw on the control surface. It provides an overridden Paint method to configure the Pen, Brush, and Font for the Canvas prior to calling the inherited Paint method. Use the OnPaint event handler to perform drawing operations needed for the control.

See also

TGraphicControl

  

TGraphicControl is the base class for all lightweight controls.

How to use StdCtrls, ComCtrls or ExtCtrls.

  

How to use StdCtrls, ComCtrls or ExtCtrls.



CT Web help

CodeTyphon Studio