BorderWidth Property

See AlsoD3KCAD              Example0PDS9WC>Low

Applies To

LineTW530P, shape9JZFLA.

Description

Determines the width of a control's border.

Usage

[form.]{ line|shape}.BorderWidth[ = numericexpression ]

Remarks

The BorderWidth property settings can range from 1 to 8192, inclusive.

Use the BorderWidth and BorderStyle43RNRL properties to specify the kind of border you want for a line and shape control.  The following table shows the effect of BorderStyle settings on the BorderWidth property:

BorderStyle         Effect on BorderWidth

 

0                      BorderWidth setting is ignored.

1 to 5                The border width expands from the center of the border; the height and width of the control are measured from the center of the border.

6                      The border width expands inward on the control from the outside of the border; the height and width of the control are measured from the outside of the border.

 

If BorderWidth is greater than 1, the only effective settings of BorderStyle are 1 (Solid), and 6 (Inside Solid).

Data Type

IntegerDOKXHY


See Also

Help:

BorderStyle Property43RNRL

DrawWidth PropertyMEUSKJ

Height, Width PropertiesL14VJZ

 

Programmer's Guide:

Chapter 3, "Creating and Using Controls"


BorderWidth Property Example

The example uses two combo boxes to select different widths and styles for the borders of a shape control.  To try this example, paste the code into the Declarations section of a form that contains a shape control and one combo box.  For the combo box, set Style = 2 and Index = 0 (to create a control array).  Then press F5 and click the form.

Sub Form_Load ()

   Combo1(0).Width = 1440 * 1.5

   Load Combo1(1)

   Combo1(1).Top = Combo1(0).Top + Combo1(0).Height * 1.5

   Combo1(1).Visible = True

   For I = 0 To 6

      Combo1(0).AddItem "BorderStyle = " & I

   Next I

   For I = 1 To 10

      Combo1(1).AddItem "BorderWidth = " & I

   Next I

   Combo1(0).ListIndex = 1

   Combo1(1).ListIndex = 0

End Sub

 

Sub Combo1_Click (Index As Integer)

   If Index = 0 Then

      Shape1.BorderStyle = Combo1(0).ListIndex

   Else

      Shape1.BorderWidth = Combo1(1).ListIndex + 1

   End If

End Sub