Share via


ISmartDocProperties Interface [Office 2003 SDK Documentation]

The ISmartDocProperties interface provides access to the key and value pairs of properties for built-in smart document controls. You can also use the ISmartDocProperties interface to access the built-in properties for ActiveX controls.

Smart Document Controls

The following sections contain lists of the key names and possible values for all smart document controls.

Key names for all controls

Property key name Description
X An integer that specifies the left position of a control relative to the left edge of the task pane. Must be a positive value. Negative values are ignored.
Y An integer that specifies the top position of a control relative to the bottom of the preceding control; if the control is the first control in the task pane, the control's top position is relative to the top of the task pane. Must be a positive value. Negative values are ignored.
H An integer that specifies the height of the control. Must be a positive value. Negative values are ignored.
W An integer that specifies the width of the control. Must be a positive value. Negative values are ignored.

Note  Specifying width for a link control may prevent the control from being displayed in the task pane.

Align A string that specifies the horizontal alignment for a control. Can be one of the following values:
Center Centers the control from left to right in the task pane.
LeftLeft-aligns a control in the task pane (default).
RightRight-aligns a control in the task pane.

Note  You should also set the width (W) when you set the alignment (Align) for a label control. The width should be large enough to encompass the entire label. Otherwise, the label is left-aligned in the task pane.

Center Centers the control from left to right in the task pane.
Left Left-aligns a control in the task pane (default).
Right Right-aligns a control in the task pane.
Layout A string that specifies the direction of text flow in the control. Can be one of the following values:
LTRSpecifies left-to-right reading order.
RTLSpecifies right-to-left reading order.
LTR Specifies left-to-right reading order.
RTL Specifies right-to-left reading order.
SectionCaptionDirection A string that specifies the direction of text flow in the caption for a control. Can be one of the following values:
LTRSpecifies left-to-right reading order.
RTLSpecifies right-to-left reading order.
LTR Specifies left-to-right reading order.
RTL Specifies right-to-left reading order.

Key names for controls that contain text captions

Property key name Description
FontFace A string that specifies the font face of the text.
FontSize An integer that specifies the font size of the text.
FontStyle A string that specifies special font formatting. Can be one of the following values:
noneNo font formatting (default).
underlineUnderlines text.
italic Italicizes text.
strikeoutDraws a line through text.

Note  You can apply a style to a control caption by setting the property key FontStyle for a smart document control. However, you cannot apply more than one style at a time. For example, you can't have a caption that is both italic and underlined.

none No font formatting (default).
underline Underlines text.
italic Italicizes text.
strikeout Draws a line through text.
FontWeight A string that specifies whether the text is displayed as bold or normal.
normalNo font formatting (default).
boldMakes text bold.
normal No font formatting (default).
bold Makes text bold.

Key names for text boxes, list boxes, and combo boxes

Property key name Description
NumberOfLines An integer that specifies the number of lines that are visible without scrolling in a list box or combo box.
IsEditable A Boolean value that specifies whether a user can edit the contents of a combo box.
ControlOnSameLine A Boolean value that specifies whether to display the control on the same line as the caption.

Key names for text boxes

Property key name Description
PasswordCharacter A single character that specifies the character that will be used to obscure typing into the text box so that it can be used as a password field.
IsMultiline A Boolean value that specifies whether the text box allows multiple lines.

Note  Control displays only a single line at a time.

Key names for images

Property key name Description
Border A Boolean value that specifies whether to display a border on mouseover events for an image.

Key names for document fragments

Property key name Description
Expand A Boolean value that specifies whether to expand or collapse a document fragment in the task pane.

Key names for Help text

Property Key name Description
ExpandHelp A Boolean value that specifies whether to expand or collapse Help text in the task pane.

Key names for ActiveX controls

The property keys for an ActiveX control are determined by the ActiveX control's properties. For example, if an ActiveX control has a property named "Width," "Width" is a key name for the ActiveX control. In addition, you can use the following properties for ActiveX controls in your smart documents.

Property key name Description
ExpandToFill A Boolean value that specifies whether to expand the ActiveX control to fill the task pane.

Note  Do not use ExpandToFill with controls that do not pertain to the entire document.

KeepAlive A Boolean value that specifies whether the control remains active even if the context of the control changes.

Note  Although the control is kept active as long as possible, it is not guaranteed to be active when the task pane is redrawn. Do not use KeepAlive with ActiveX controls that do not pertain to the entire document.