mlreportgen.ppt.TextBox class
Package:mlreportgen.ppt
Text box
Creation
Description
creates an empty text box object.textBoxObj
= TextBox()
Properties
Bold
—Option to use bold for text
logical value
Option to use bold for text, specified astrue
orfalse
. To make text bold, set this property totrue
FontColor
—Font color for presentation element
character vector
Font color, specified as a character vector. Use either a CSS color name or a hexadecimal RGB value.
For a list of CSS color names, seehttps://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 each for the red, green, and blue values. For example,'#0000ff'
specifies blue.
Italic
—Option to use italics for text
[]
(default) |logical value
Option to use italics for text, specified as a logical. Set this property totrue
. Setting theItalic
property adds a correspondingmlreportgen.ppt.Italic
format object to theStyle
property of this presentation element. Removing theItalic
property setting removes the object.
Data Types:logical
Underline
—Type of underline for text
[]
(default) |character vector
Type of underlining for text, specified as a character vector. Setting theUnderline
property adds a correspondingmlreportgen.ppt.Underline
format object to theStyle
property for this element. Removing theUnderline
property setting removes the object. You can specify one of these types of underlines.
Value | Description |
---|---|
'single' |
Single underline |
'double' |
Double underline |
'heavy' |
Thick underline |
'words' |
Words only underlined (not spaces) |
“点” |
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 |
'dotdotdash' |
Dot dot dash underline |
'dotdotdashheavy' |
Thick dot dot dash underline |
'dotdashdotheavy' |
Thick dash dot underline |
'wavy' |
Wavy underline |
'wavyheavy' |
Thick wavy underline |
'wavydouble' |
Two wavy underlines |
Name
—Text box name
character vector
Text box name, specified as a character vector.
X
—Upper-left x-coordinate position of text box
character vector
Upper-left x-coordinate position of text box, specified in the formvalueUnits
whereUnits
is an abbreviation for the units. Valid abbreviations are:
px
— pixels (default)cm
— centimetersin
— inchesmm
— millimeterspc
— picaspt
— points
Y
—Upper-left y-coordinate position of text box
character vector
Upper-left y-coordinate position of text box, specified in the formvalueUnits
whereUnits
is an abbreviation for the units. Valid abbreviations are:
px
— pixels (default)cm
— centimetersin
— inchesmm
— millimeterspc
— picaspt
— points
Width
—Width of text box
character vector
Width of text box, specified in the formvalueUnits
whereUnits
is an abbreviation for the units. Valid abbreviations are:
px
— pixels (default)cm
— centimetersin
— inchesmm
— millimeterspc
— picaspt
— points
Height
—Height of text box
character vector
Height of text box, specified in the formvalueUnits
whereUnits
is an abbreviation for the units. Valid abbreviations are:
px
— pixels (default)cm
— centimetersin
— inchesmm
— millimeterspc
— picaspt
— points
Style
—Text formatting
cell array of PPT format objects
Text formatting, specified as a cell array of PPT format objects. You can specify thesemlreportgen.ppt
format objects:
BackgroundColor
objectFontFamily
objectFontSize
objectBold
objectFontColor
objectItalic
objectUnderline
object
Children
—Children of this PPT API object
cell array of PPT objects
Child elements of this object, specified as a cell array of PPT objects. This property is read-only.
Parent
—Parent of this PPT API object
PPT object
Parent of this object, specified as a PPT object. This property is read-only.
Tag
—Tag for this PPT API object
character vector|string scalar
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 formCLASS:ID
, whereCLASS
is the object class andID
is the value of theId
property of the object.
Specifying your own tag value can help you to identify where an issue occurred during presentation generation.
Id
—ID for this PPT API object
character vector|string scalar
ID for this PPT API object, specified as a character vector or string scalar. A session-unique ID is generated as part of object creation. You can specify an ID to replace the generated ID.
Methods
Examples
Add a Text Box
Create a presentation with two slides.
importmlreportgen.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:
版本History
Introduced in R2014b
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
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
- 曼联国王dom(English)