RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TShape.Pen Property

Specifies the pen used to outline the shape control.

Pascal
property Pen: TPen;
C++
__property TPen Pen;

Read Pen to obtain the TPen object that represents the color and style of the line used to outline the shape. Use the properties of Pen to change the color or style. 

Pen is a TPen object that represents the color and style of the line used to outline the shape. Use the properties and methods of TPen to change the color or pattern of the shape object: 

Shape1.Pen.Width := 1;  

Shape1.Pen.Color := Red;  

Shape1->Pen->Width = 1;  

Shape1->Pen->Color = clRed;

Note: Setting the Pen property assigns the properties of another TPen object to the shape's pen. The shape object does not take ownership of the assigned object.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!