Software Developer's Kit - ChemDraw

Send comments on this topic
Width Property
See Also 

Description

Member of ChemDraw Control.Border.

Returns the width of the border line.

Property type

Read-write property

Syntax

Visual Basic
Public Property Width() As Double

Return Type

Double

Remarks

Sets and returns the cell border width, expressed in points. In the example RightBorder is 2.

Example

'Declares variables 

 Private Sub cmdCell_Click()
    Dim myTable As ChemDrawControl11Ctl.Table
    Dim myCell As ChemDrawControl11Ctl.Cell
    Set myTable = ChemDrawCtl.selection.Tables.Item(1)
    Set myCell = ChemDrawCtl.selection.Tables.Item(1).Cells.Item(1)
   'returs the border color
    Text1.text = MyCell.BottomBorder.Color
   'sets color, border and width, as in the example
    myCell.BottomBorder.Color = vbRed 
    myCell.BottomBorder.IsDashed = True 
    myCell.BottomBorder.Width = 2 
    myCell.LeftBorder.Color = vbBlue
    myCell.LeftBorder.IsDashed = True 
    myCell.LeftBorder.Width = 2 
    myCell.RightBorder.Color = vbBlue 
    myCell.RightBorder.Width = 2 
End Sub

See Also