mlreportgen.ppt.TextBox Class
Namespace: mlreportgen.ppt
Text box
Description
Text box to include in a presentation.
The mlreportgen.ppt.TextBox
class is a handle
class.
Creation
Description
creates an
empty text box object.textBoxObj
= TextBox
Properties
Name
— Text box name
''
(default) | character vector | string scalar
Text box name, specified as a character vector or string scalar.
Attributes:
NonCopyable | true |
Data Types: char
| string
Font
— Font family for text
[]
(default) | character vector | string scalar
Font family for the text, specified as a character vector or string scalar. Specify a font that appears in the font list in Microsoft® PowerPoint®. To see the font list, in PowerPoint, on the Home tab, in the Font group, click the arrow to the right of the font.
Attributes:
NonCopyable | true |
Data Types: char
| string
ComplexScriptFont
— Font family for complex scripts
[]
(default) | character vector | string scalar
Font family for complex scripts, specified as a character vector or string scalar. Specify a font family to use when substituting in a locale that requires a complex script, such as Arabic or Asian, to render text.
Attributes:
NonCopyable | true |
Data Types: char
| string
FontColor
— Font color for text
[]
(default) | character vector | string scalar
Font color for the text, specified as a character vector or string scalar that consists of a CSS color name or hexadecimal RGB value.
For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords.
To specify a hexadecimal RGB format, use
#
as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example,"#0000ff'"
specifies blue.
Example: "blue"
Example: "#0000ff"
Attributes:
NonCopyable | true |
Data Types: char
| string
FontSize
— Font size of text
[]
(default) | character vector | string scalar
Font size of the text, specified as a character vector or string scalar that consists of a number followed by a unit of measurement. For example, '11pt'
specifies 11 points. Valid abbreviations are:
"px"
— pixels"cm"
— centimeters"in"
— inches"mm"
— millimeters"pc"
— picas"pt"
— points
Attributes:
NonCopyable | true |
Data Types: char
| string
Bold
— Whether to use bold for text
[]
(default) | true
| false
Whether to use bold for the text, specified as true
or
false
. Specify true
for bold text.
Attributes:
NonCopyable | true |
Data Types: logical
Italic
— Whether to use italic for text
[]
(default) | true
| false
Whether to use italic for the text, specified as true
or
false
. Specify true
for italic text.
Attributes:
NonCopyable | true |
Data Types: logical
Strike
— Strikethrough style for text
[]
(default) | 'single'
| 'none'
| 'double'
Strikethrough style for the text, specified as one of these values:
'single'
— Single horizontal line'none'
— No strikethrough line'double'
— Double horizontal line
Attributes:
NonCopyable | true |
Data Types: char
| string
Subscript
— Whether to display text as a subscript
[]
(default) | true
| false
Whether to display the text as a subscript, specified as true
or
false
. A setting of true
renders the text as a
subscript.
Attributes:
NonCopyable | true |
Data Types: logical
Superscript
— Whether to display text as a superscript
[]
(default) | true
| false
Whether to display the text as a superscript, specified as true
or
false
. A setting of true
renders the text as a
superscript.
Attributes:
NonCopyable | true |
Data Types: logical
Underline
— Underline style for text
[]
(default) | 'single'
| 'double'
| ...
Underline style for the text, specified as one of these values:
Value | Description |
---|---|
"single" | Single underline |
"double" | Double underline |
"heavy" | Thick underline |
"words" | Only words underlined (not spaces) |
"dotted" | Dotted underline |
"dottedheavy" | Thick, dotted underline |
"dash" | Dashed underline |
"dashheavy" | Thick, dashed underline |
"dashlong" | Long, dashed underline |
"dashlongheavy" | Thick, long, dashed underline |
"dotdash" | Dot-dash underline |
"dotdashheavy" | Thick, dot-dash underline |
"dotdotdash" | Dot-dot-dash underline |
"dotdotdashheavy" | Thick, dot-dot-dash underline |
"wavy" | Wavy underline |
"wavyheavy" | Thick, wavy underline |
"wavydouble" | Wavy, double underline |
"none" | No underline |
Attributes:
NonCopyable | true |
Data Types: char
| string
X
— Upper-left x-coordinate position
character vector | string scalar
Upper-left x-coordinate position, specified as a character vector or string scalar that consists of a number followed by an abbreviation for a unit of measurement. For example, "5in" specifies five inches. Valid abbreviations are:
"px"
— pixels"cm"
— centimeters"in"
— inches"mm"
— millimeters"pc"
— picas"pt"
— points
Note
When the PPT API creates an mlreportgen.ppt.TextBox object, this property value is specified in English Metric Units (EMU). If you set this property, you must use one of the units in the previous list.
Attributes:
NonCopyable | true |
Data Types: char
| string
Y
— Upper-left y-coordinate position
character vector | string scalar
Upper-left y-coordinate position, specified as a character vector or string scalar that consists of a number followed by an abbreviation for a unit of measurement. For example, "5in" specifies five inches. Valid abbreviations are:
"px"
— pixels"cm"
— centimeters"in"
— inches"mm"
— millimeters"pc"
— picas"pt"
— points
Note
When the PPT API creates an mlreportgen.ppt.TextBox object, this property value is specified in English Metric Units (EMU). If you set this property, you must use one of the units in the previous list.
Attributes:
NonCopyable | true |
Data Types: char
| string
Width
— Width of text box
[]
(default) | character vector | string scalar
Width of text box, specified in the form valueUnits
where Units
is an abbreviation for the units. Valid
abbreviations are:
"px"
— pixels"cm"
— centimeters"in"
— inches"mm"
— millimeters"pc"
— picas"pt"
— points
Attributes:
NonCopyable | true |
Data Types: char
| string
Height
— Height of text box
[]
(default) | character vector | string scalar
Height of text box, specified in the form valueUnits
where Units
is an abbreviation for the units. Valid
abbreviations are:
"px"
— pixels"cm"
— centimeters"in"
— inches"mm"
— millimeters"pc"
— picas"pt"
— points
Attributes:
NonCopyable | true |
Data Types: char
| string
Style
— Text formatting
[]
(default) | cell array of PPT format objects
Text formatting, specified as a cell array of PPT format objects. You can
specify these mlreportgen.ppt
format objects:
BackgroundColor
objectFontFamily
objectFontSize
objectBold
objectFontColor
objectItalic
objectUnderline
object
Attributes:
NonCopyable | true |
Children
— Children of mlreportgen.ppt.TextBox
object
cell array of PPT API objects
Child elements of mlreportgen.ppt.TextBox
object, specified as a cell array of PPT
API objects.
Attributes:
NonCopyable | true |
Parent
— Parent of mlreportgen.ppt.TextBox
object
PPT API object
Parent of this object, specified as a PPT API object. A PPT API object must only have one parent.
Attributes:
SetAccess | private |
NonCopyable | true |
Tag
— Tag for mlreportgen.ppt.TextBox
object
character vector | string scalar
Tag for the mlreportgen.ppt.TextBox
object, 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. Specify your own tag value to help
you identify where to look when an issue occurs during document generation.
Attributes:
NonCopyable | true |
Data Types: char
| string
Id
— Object identifier for mlreportgen.ppt.TextBox
object
character vector | string scalar
Object identifier for the mlreportgen.ppt.TextBox
object, 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:
NonCopyable | true |
Data Types: char
| string
Methods
Examples
Add a Text Box
Create a presentation with two slides.
import mlreportgen.ppt.* ppt = Presentation('myTextBoxPresentation.pptx');
Add a blank slide.
blank = add(ppt,'Blank');
Create a text box and define its location and size.
tb = TextBox(); tb.X = '1in'; tb.Y = '1in'; tb.Width = '8in'; tb.Height = '0.5in';
Add text to the text box and append the text box to the blank slide.
add(tb,'This is the title of my blank slide');
add(blank,tb);
Close and view the presentation.
close(ppt); rptview(ppt);
Here is the generated presentation:
Version History
Introduced in R2014b
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)