O'Reilly logo

Mastering Data Visualization with Microsoft Visio Professional 2016 by David J Parker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding data-linked shapes to containers

Containers group shapes together visually. The normal user adds a container to the existing shapes using the Insert | Diagram Parts | Container button. The same action can be repeated in code using the Page.DropContainer() method. The container shape is added to the page and encloses the target shapes.

An alternative is to use the Shape.ContainerProperties.AddMember() method, where Shape is a container shape. The container can then expand to enclose the target shapes, which remain in their current positions.

The final alternative action is to move the target shapes into an existing container shape. In the following screenshot, the Person shapes are on the outside of the Sales container:

The following sub-function, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required