Software Developer's Kit - ChemDraw

Send comments on this topic
LabelFace Property
See Also 


Member of ChemDraw Control.Settings

Sets and returns the style used for atom labels.

Property type

Read-write property


Visual Basic
Public Property LabelFace() As Integer

Return Type



This property refers to the font used for the atom labels (bold, italic, underline, normal, subscript, superscript or formula), as a bitmask of CDFontStyle. Another way to change the label face is using Caption.Face.


'Declares variable vObject
 Dim vObject As ChemDrawControl10Ctl.Object
'Checks that there is an Object loaded the variable
 If  Selection.Object.Count < 1 Then
     Exit Sub
 End If

 Private Sub cmdSettings_click() 
    'Sets the Settings.LabelFace as italic 
     vObject.Settings.LabelFace = 2
    'this changes LabelFace (which is style) to 4 (LabelFace = 4 is underlined)
     ctlChemDraw.Settings.ApplySettings ctlChemDraw.Settings.LabelFace, 4

    'Displays settings 
     Text2.text = vObject.Settings.LabelFace 
    'If object is a caption: 
     Text3.text = vObject.Face
 End Sub

See Also