Object Model Reference : Classes : L : Layer : Methods : Layer.CreateParagraphText |
Function CreateParagraphText(Left As Double, Top As Double, Right As Double, Bottom As Double, [Text As String], [LanguageID As cdrTextLanguage = cdrLanguageNone], [CharSet As cdrTextCharSet = cdrCharSetMixed], [Font As String], [Size As Single], [Bold As cdrTriState = cdrUndefined], [Italic As cdrTriState = cdrUndefined], [Underline As cdrFontLine = cdrMixedFontLine], [Alignment As cdrAlignment = cdrMixedAlignment]) As Shape
Member of Layer
The CreateParagraphText method creates a paragraph-text object at a specified location on a layer.
Parameter
|
Description
|
Left
|
Specifies, in document units, the distance from the left side of the paragraph-text frame to the left side of the page frame
|
Top
|
Specifies, in document units, the distance from the top side of the paragraph-text frame to the top of the page frame
|
Right
|
Specifies, in document units, the distance from the right side of the paragraph-text frame to the right side of the page frame
|
Bottom
|
Specifies, in document units, the distance from the bottom of the paragraph-text frame to the bottom of the page frame
|
Text
|
Specifies the content of the newly created paragraph text. The value of the Text parameter becomes the actual text created with the CreateParagraphText method. This parameter is optional.
|
LanguageID
|
Specifies the language. This parameter is optional, and its default value is cdrLanguageNone (0).
|
CharSet
|
Specifies the character set. This parameter is optional, and its default value is cdrCharSetMixed (-1).
|
Font
|
Specifies the font. This parameter is optional.
|
Size
|
Specifies the font size. This parameter is optional, and its default value is 0.
|
Bold
|
Specifies whether to apply boldface. This parameter is optional, and its default value is cdrUndefined (-2).
|
Italic
|
Specifies whether to apply italics. This parameter is optional, and its default value is cdrUndefined (-2).
|
Underline
|
Specifies an underline to apply. This parameter is optional, and its default value is cdrMixedFontLine (7).
|
Alignment
|
Specifies the alignment. This parameter is optional, and its default value is cdrMixedAlignment (6).
|
The following VBA example creates a paragraph-text object, formatted in boldface Times New Roman font.
Sub Test() |
Dim s As Shape |
Set s = ActiveLayer.CreateParagraphText(0, 0, 4, 4, "Paragraph Text", , , _ |
"Times New Roman", 24, cdrTrue, cdrTrue, , cdrCenterAlignment) |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.