Vcl.ExtCtrls.TShape.Pen
Delphi
property Pen: TPen read FPen write SetPen;
C++
__property Vcl::Graphics::TPen* Pen = {read=FPen, write=SetPen};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Vcl.ExtCtrls.pas Vcl.ExtCtrls.hpp |
Vcl.ExtCtrls | TShape |
Description
Specifies the pen used to outline the shape control.
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.