Pen.property

Description

Settings for a line or the outline of a control.

Applies to

Line, Oval, Rectangle, and RoundRectangle controls

Syntax

PowerBuilder dot notation:

dw_control.Object.controlname.Pen.property

Describe and Modify argument:

"controlname.Pen.property { = value }"

Parameter

Description

controlname

The name of the control whose Pen property you want to get or set.

property

A property that applies to the Pen characteristics of controlname, as listed in the table below.

value

The value of the property, as shown in the table below. Value can be a quoted DataWindow expression.

Property for Pen

Value

Color

(exp) A long specifying the color (the red, green, and blue values) to be used as the control’s line color.

Painter: Pen Color option.

Style

(exp) A number specifying the style of the line.

Values are:

  • 0 – Solid

  • 1 – Dash

  • 2 – Dotted

  • 3 – Dash-dot pattern

  • 4 – Dash-dot-dot pattern

  • 5 – Null (no visible line)

Painter: Pen Style option.

Width

(exp) A number specifying the width of the line in the unit of measure specified for the DataWindow.

Painter: Pen Width option (not available when Style is a value other than Solid).

Usage


In the painter

Select the control and set values in the Properties view, General tab.

Examples

Example 1

string setting

setting = dw1.Object.line_1.Pen.Width

dw1.Object.line_1.Pen.Width = 10

setting = dw1.Describe("line_1.Pen.Width")

dw1.Modify("line_1.Pen.Width=10")