Main Content

mlreportgen.ppt.Strike Class

Namespace: mlreportgen.ppt

Strikethrough text

Description

Format that draws a line through presentation text.

The mlreportgen.ppt.Strike class is a handle class.

Class Attributes

HandleCompatible
true
ConstructOnLoad
true

For information on class attributes, see Class Attributes.

Creation

Description

strikeObj = mlreportgen.ppt.Strike draws a single, horizontal line through text.

example

strikeObj = mlreportgen.ppt.Strike(style) sets the Style property to the specified strike style.

Properties

expand all

ID for this PPT API object, specified as a character vector or string scalar. A session-unique ID is generated as part of the object creation. You can specify an ID to replace the generated ID.

Attributes:

NonCopyable
true

Data Types: char | string

Tag for this PPT API object, specified as a character vector or string scalar. A session-unique tag is generated as part of the creation of this object. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object.

Specifying your own tag value can help you to identify where issues occur during presentation generation.

Attributes:

NonCopyable
true

Data Types: char | string

Strikethrough style, specified as one of these values:

  • 'single' — Single horizontal line

  • 'none' — No strikethrough line

  • 'double' — Double horizontal line

Examples

collapse all

Create a presentation.

import mlreportgen.ppt.*

ppt = Presentation('myStrikePresentation.pptx');
open(ppt);
slide = add(ppt,'Title and Content');

Create a paragraph and append text with double strikethrough formatting.

p = Paragraph('Hello World');

tStrike = Text(' strikethrough text');
tStrike.Style = {Strike('double')};
append(p,tStrike);

Create text without strikethrough formatting and append it to the paragraph.

tVisible = Text(' visible text');
append(p,tVisible);

Add the paragraph to the slide.

replace(slide,'Content',p);

Close and view the presentation.

close(ppt);
rptview(ppt);

Version History

Introduced in R2015b