Table of contents
TOC
折叠目录
展开目录

Shape.TextStyle 属性 (Visio)Shape.TextStyle Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

获取或设置对象的文字样式。读/写。Gets or sets the text style for an object. Read/write.

语法Syntax

表达式文本样式expression . TextStyle

表达式_一个表示一个Shape对象的变量。_expression A variable that represents a Shape object.

返回值Return Value

字符串String

注解Remarks

将一种样式设置为不存在的样式将产生错误。将一种样式设置为现有样式的另一种 (例如,将TextStyle属性设置为填充样式) 无效。将一种样式设置为现有的具有多个属性集的样式仅更改的属性的组件 (例如,将TextStyle属性设置为一种样式有行,文本和填充属性更改的文本属性)。Setting a style to a nonexistent style generates an error. Setting one kind of style to an existing style of another kind (for example, setting the TextStyle property to a fill style) does nothing. Setting one kind of style to an existing style that has more than one set of attributes changes only the attributes for that component (for example, setting the TextStyle property to a style that has line, text, and fill attributes changes only the text attributes).

若要保留形状的局部格式设置,请使用TextStyleKeepFmt属性。To preserve a shape's local formatting, use the TextStyleKeepFmt property.

从 Visio 2002 开始,将TextStyle属性设置为空字符串 ("") 将导致主控形状的样式重新应用于所选内容或形状。(早期版本生成"无此类样式"例外)。如果所选内容或形状没有主控形状,则其样式保持不变。Beginning with Visio 2002, setting TextStyle to an empty string ("") will cause the master's style to be reapplied to the selection or shape. (Earlier versions generate a "no such style" exception.) If the selection or shape has no master, its style remains unchanged.

© 2018 Microsoft