srvpaintbox TSRVPaintBox

<< Click to display table of contents >>

srvpaintbox TSRVPaintBox

TSRVPaintBox provides a canvas that applications can use for rendering an image.

Unit SRVPaintBox;

Syntax

TSRVPaintBox = class(TSRVCanvasControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomSRVGraphicControl

TSRVCanvasControl

Properties and events

This component publishes the following properties and events inherited from TSRVCanvasControl:

SkinManager;

SkinSchemeIndex;

DrawOnPrint;

OnPaint;

OnMouseEnter, OnMouseLeave;

properties inherited from TGraphicControl.

Painting

1)Caption is drawn at the position Alignment using Font (RTL BiDiMode inverts right and left alignments).

2)OnPaint event occurs (see TSRVCanvasControl). Create an OnPaint event handler to draw the image of the paint box.

3)If SkinManager is assigned, a border is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex].

Example (Caption is empty; the text, the ellipse, the red rectangle are drawn in OnPaint):

SRVPaintBox Scheme