Software Developer's Kit - ChemDraw

Send comments on this topic
Bottom Property
See Also 

Description

Member of ChemDraw Control.Rect.

Sets and returns the bottom line of this rectangle.

Property type

Read-write property

Syntax

Visual Basic
Public Property Bottom() As Double

Return Type

Double

Remarks

Bottom sets and returns the coordinate to the bottom line of a rectangle

Bottom is expressed in points and when working on the same object, the value returned from bottom is equivalent to BottomLeft.Y or BottomRight.Y multiplied by 20. 

Example

'This example illustrates the use of Rect Properties 
'Declares the variables

 Dim myObject  As ChemDrawControl10Ctl.Object
 Dim vObject As ChemDrawControl10Ctl.Object 
 Dim myRect  As ChemDrawControl10Ctl.Rect
'Checks that there is an object loaded in the variable
 If  Selection.Objects.Count < 1 Then 
     Exit Sub
 End If

'Works with one object (could be any ChemDraw object)
 For Each myObject In Selection.Objects
     If  myObject.Selected = True Then
         Set
vObject = myObject
     End If
 Next
 
Private Sub cmdRectProperties_Click()
     Set myRect = vObject.Bounds  
    'Shows the properties of Rect - using the rectangle that bounds an object
     Label2.Caption = "Rect coordinates that return values in IntermCoords" + Chr$(13) + _
            Format(myRect.Bottom, "0.0") + Chr$(13) + _
            Format(myRect.Height, "0.0") + Chr$(13) + _
            Format(myRect.Left,   "0.0") + Chr$(13) + _
            Format(myRect.Right,  "0.0") + Chr$(13) + _
            Format(myRect.Top,    "0.0") + Chr$(13) + _
            Format(myRect.Width,  "0.0") + Chr$(13)
    'Applies the IsEmpty property: Returns False if myRect contains an object
     Text1.Text = myRect.IsEmpty 
 End Sub 

See Also