Method: AddComment for CommentSelectedElements
- Updated2024-09-12
- 1 minute(s) read
DIAdem REPORT > Methods > Method: AddComment for CommentSelectedElements
Method: AddComment for CommentSelectedElements
Selects the subobject of a comment in DIAdem REPORT associated with a specific index. In order to select an individual frame line, enable the property UseIndividualLineStyle.
Set oCommentSelectedElement = Object.AddComment(ElementType, Index)
| Object | CommentSelectedElements Object with this method | ||||||||||||||||||
| ElementType | Specifies the type of the selected element. Enumeration with read access and the following selection terms:
| ||||||||||||||||||
| Index | LongInteger Specifies the index of the selected element. | ||||||||||||||||||
| oCommentSelectedElement | CommentSelectedElement Returned object |
The following example generates a comment and selects the top frame:
| VBScript | Python |
Dim oMyComment, oMyFrameLine, oMyLineIndividual Call Report.NewLayout() Set oMyComment = Report.ActiveSheet.Objects.Add(eReportObjectComment,"MyComment") Set oMyFrameLine = oMyComment.Comment.BorderLine Set oMyLineIndividual = oMyFrameLine.LineBottom oMyFrameLine.UseIndividualLineStyle = True Call oMyComment.SelectedElements.AddComment(eCommentFrameTop , 1)