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.

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

example

Properties

expand all

Strikethrough style, specified as one of these values:

  • "single" — Single horizontal line

  • "none" — No strikethrough line

  • "double" — Double horizontal line

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Tag, specified as a character vector or string scalar. The PPT API generates a session-unique tag 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. Use this value to help identify where an issue occurs during document generation.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Object identifier, specified as a character vector or string scalar. The PPT API generates a session-unique identifier when it creates the document element object. You can specify your own value for Id.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

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);

Sample slide with a paragraph that reads "Hello World strikethrough text visible text", with "strikethrough text" displaying with two lines through it

Version History

Introduced in R2015b