TcxCustomCanvas.DrawEdge(TRect,Boolean,Boolean,TcxBorders) Method
Draws edges of a specified rectangle.
Declaration
procedure DrawEdge(const R: TRect; ASunken: Boolean; AOuter: Boolean; ABorders: TcxBorders = cxBordersAll); virtual;
Parameters
Name | Type |
---|---|
R | TRect |
ASunken | Boolean |
AOuter | Boolean |
ABorders | TcxBorders |
Remarks
Call this procedure to decorate a solid fill rectangle (a button, for instance) with a pseudo-3D sunken or raised edge effect based on an imitation of the light shed from the left top corner of the window. For instance, the left and top borders are lighter than the “raised” decorated rectangle, while the right and bottom are darker to imitate the shadow cast by the rectangle.
Use the R parameter to pass a rectangle that has the same center as the decorated rectangle. The required size of the centered R rectangle depends on the AOuter parameter value:
AOuter Value | Description |
---|---|
True | The procedure draws the R rectangle as an external outline for the decorated rectangle. R must be two pixels wider and higher than the decorated rectangle. |
False | The procedure draws the R rectangle as an internal outline for the decorated rectangle. The both rectangles must be identical. |
Pass True or False as the ASunken parameter to choose between the sunken and raised edge effects, respectively.
The optional ABorders parameter allows you to hide individual edges. This can be useful if you need to display only those edges that imitate a well-lit surface (that is, left and top edges in case of the “raised” effect) or shadow.
Note
The DrawEdge procedure uses only the clBtnShadow, clBtnHighlight, cl3DDkShadow, and cl3DLight system colors to draw all possible pseudo-3D effects.