IWxStyle.LinePenWidth

Fore Syntax

LinePenWidth: Double;

Fore.NET Syntax

LinePenWidth: Double;

Description

The LinePenWidth property determines line width.

Example

Executing the example requires a form with the Button and UiWorkspaceObject components with the Button1 and UiWorkspaceObject1 identifiers respectively. A corresponding repository object must be connected to UiWorkspaceObject. This component must also contain a previously created ellipse shape.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ws: IWxWorkspace;
    Ellipse: IWxEllipse;
    Style: IWxStyle;
Begin
    ws := UiWorkspaceObject1.Instance 
As IWxWorkspace;
    ws.BeginUpdate;
    Ellipse := ws.Shapes.Item(
0As IWxEllipse;
    Style := Ellipse.Style;
    Style.LinePenWxDashStyle := WxDashStyle.Dash;
    Style.LinePenColor := GxColor.FromName(
"Green");
    Style.LinePenWidth := 
1.5;
    ws.EndUpdate;
End Sub Button1OnClick;

After executing this example, on clicking the Button1 component the border with defined settings is set for the ellipse shape positioned on the UiWorkspaceObject1 component.

Fore.NET Example

Executing the example requires a form with the Button and UiWorkspaceObjectNet components with the Button1 and UiWorkspaceObjectNet1 identifiers respectively. A corresponding repository object must be connected to UiWorkspaceObject. This component must also contain a previously created ellipse shape.

Imports System;
Imports System.Windows.Forms;
Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Workspace;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.ExtCtrls;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    ws: IWxWorkspace;
    Ellipse: IWxEllipse;
    Style: IWxStyle;
    SColor: GxColorClassClass = New GxColorClassClass();
Begin
    ws := uiWorkspaceObjectNet1.WorkspaceObjectUi.Instance As WxWorkspace;
    ws.BeginUpdate();
    Ellipse := ws.Shapes.Item[0] As  IWxEllipse;
    Style := Ellipse.Style;
    Style.LinePenWxDashStyle := WxDashStyle.wdsDash;
    Style.LinePenColor := SColor.FromName("Green");
    Style.LinePenWidth := 1.5;
    ws.EndUpdate();
End Sub;

After executing this example, on clicking the Button1 component the border with defined settings is set for the ellipse shape positioned on the UiWorkspaceObjectNet1 component.

See also:

IWxStyle