Table of contents
TOC
Collapse the table of content
Expand the table of content

GraphicItem.HorizontalPosition Property (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Gets or sets the horizontal position of the GraphicItem object relative to the shape to which it is applied. Read/write.

Note This Visio object or member is available only to licensed users of Visio Professional 2013.

Syntax

expression . HorizontalPosition

expression An expression that returns a GraphicItem object.

Return Value

VisGraphicPositionHorizontal

Remarks

The default horizontal callout position for graphic items in the GraphicItems collection of a Master object of type visTypeDataGraphic , commonly called a data graphic master, is specified by the settings of the Master.DataGraphicHorizontalPosition property. If GraphicItem.UseDataGraphicPosition is True , the graphic item is positioned according to the default setting. If UseDataGraphicPosition is False , its horizontal position is determined by the settings of the GraphicItem.HorizontalPosition property.

Note, however, that users can manually re-position a data graphic that was applied to a shape by using the control handle of the data graphic. A position set in this manner takes precedence over the position specified by property settings.

The setting of the HorizontalPosition property corresponds to the setting of the Horizontal list box under Callout position in the New Text (or Edit Text), New Icon Set (or Edit Icon Set), or New Data Bar (or Edit Data Bar) dialog box, depending on the type of the graphic item, in the Microsoft Visio user interface (UI). However, this is the case only if Use default position is cleared.

The following possible values for the HorizontalPosition property are from the VisGraphicPositionHorizontal enumeration, which is declared in the Visio type library.

Constant**Value **Description
visGraphicFarLeft0The right edge of the graphic item's alignment box is aligned with the left edge of the shape or container's alignment box.
visGraphicLeftEdge1The vertical centerline of the graphic item's alignment box is aligned with the left edge of the shape or container's alignment box.
visGraphicLeft2The left edge of the graphic item's alignment box is aligned with the left edge of the shape or container's alignment box.
visGraphicCenter3The vertical centerline of the graphic item's alignment box is aligned with the vertical centerline of the shape or container's alignment box.
visGraphicRight4The right edge of the graphic item's alignment box is aligned with the right edge of the shape or container's alignment box.
visGraphicRightEdge5The vertical centerline of the graphic item's alignment box is aligned with the right edge of the shape or container's alignment box.
visGraphicFarRight6The left edge of the graphic item's alignment box is aligned with the right edge of the shape or container's alignment box.

Note Before you can set any property of a graphic item, you must use the Master.Open method to open for editing a copy of the data graphic master whose GraphicItems collection the graphic item belongs to. When you are finished setting properties, use the Master.Close method to commit changes.

© 2018 Microsoft