Home
%3CLINGO-SUB%20id%3D%22lingo-sub-237361%22%20slang%3D%22en-US%22%3EOrganizing%20Diagrams%20with%20Containers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-237361%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20MSDN%20on%20Aug%2C%2025%202009%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EAs%20the%20Visio%20product%20team%20began%20planning%20for%20the%20Visio%202010%20release%2C%20we%20collected%20a%20lot%20of%20customer%20drawings.%26nbsp%3B%20Even%20though%20there%20were%20many%20different%20types%20of%20diagrams%20represented%2C%20we%20found%20some%20similarities.%26nbsp%3B%20We%20noticed%20that%20as%20diagrams%20got%20more%20complex%2C%20users%20added%20special%20shapes%20to%20help%20keep%20things%20organized%20and%20understandable.%26nbsp%3B%20Often%20users%20drew%20boxes%20around%20clusters%20of%20shapes%20to%20define%20a%20logical%20grouping.%26nbsp%3B%20That%20got%20us%20thinking%20whether%20we%20could%20help%20with%20this%20kind%20of%20organization%2C%20and%20the%20Containers%20feature%20was%20born.%3C%2FP%3E%0A%20%20%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fvisio%2FWindowsLiveWriter%2FOrganizingDiagramswithContainers_14057%2FFlowchart%2520sample_2.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F43875i44062EF5BAB3CBF7%22%20%2F%3E%20%3C%2FA%3E%3C%2FP%3E%0A%20%20%3CP%3EYou%E2%80%99ve%20probably%20used%20something%20like%20a%20container%20in%20Visio%20already.%26nbsp%3B%20In%20the%20past%2C%20you%20would%20draw%20a%20rectangle%20around%20some%20shapes%2C%20choose%20Send%20to%20Back%20to%20move%20it%20behind%20the%20shapes%2C%20add%20a%20text%20label%20and%20position%20it%20near%20the%20rectangle%20edge%2C%20and%20finally%20group%20everything%20to%20keep%20the%20shapes%20together.%26nbsp%3B%20This%20works%20but%20it%20makes%20it%20hard%20to%20access%20the%20individual%20shapes%2C%20and%20you%20must%20ungroup%20and%20regroup%20every%20time%20the%20contents%20changed.%3C%2FP%3E%0A%20%20%3CP%3EThe%20Containers%20feature%20in%20Visio%202010%20makes%20it%20easy%20to%20add%20a%20visual%20boundary%20around%20shapes%2C%20including%20a%20label.%26nbsp%3B%20Visio%20does%20all%20the%20work%20to%20maintain%20the%20relationship%20between%20the%20container%20and%20its%20contents.%26nbsp%3B%20To%20add%20a%20container%20to%20your%20diagram%2C%20first%20select%20the%20shapes%20to%20be%20contained.%26nbsp%3B%20Then%20choose%20the%20Container%20command%20from%20the%20Insert%20tab%20of%20the%20ribbon.%26nbsp%3B%20A%20gallery%20appears%20with%20several%20different%20container%20styles.%26nbsp%3B%20Click%20on%20a%20style%20to%20add%20the%20container%20to%20the%20diagram.%3C%2FP%3E%0A%20%20%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fvisio%2FWindowsLiveWriter%2FOrganizingDiagramswithContainers_14057%2Fimage_4.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F43876i038B11E3F7949779%22%20%2F%3E%20%3C%2FA%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20shapes%20inside%20the%20container%20are%20not%20in%20a%20group%2C%20so%20you%20have%20direct%20access%20to%20continue%20working%20with%20them.%26nbsp%3B%20Shapes%20are%20added%20or%20removed%20simply%20by%20dragging%20them%20in%20or%20out%20of%20the%20container.%26nbsp%3B%20When%20dragging%20a%20shape%2C%20an%20orange%20highlight%20appears%20around%20the%20container%20to%20indicate%20that%20Visio%20will%20make%20the%20shape%20a%20member%20of%20the%20container.%26nbsp%3B%20The%20container%20can%20automatically%20grow%20or%20shrink%20as%20needed%20to%20fit%20the%20contents.%26nbsp%3B%20Moving%2C%20copying%20or%20deleting%20the%20container%20will%20move%2C%20copy%20or%20delete%20the%20contents%20as%20well.%3C%2FP%3E%0A%20%20%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fvisio%2FWindowsLiveWriter%2FOrganizingDiagramswithContainers_14057%2Fimage_6.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F43877i6C26FDF394987970%22%20%2F%3E%20%3C%2FA%3E%3C%2FP%3E%0A%20%20%3CP%3EContainers%20can%20be%20formatted%20just%20like%20regular%20shapes.%26nbsp%3B%20In%20particular%20the%20alignment%20of%20the%20heading%20is%20changed%20using%20the%20paragraph%20alignment%20buttons%20on%20the%20Home%20tab%20of%20the%20ribbon.%26nbsp%3B%20There%20is%20also%20a%20contextual%20tab%20that%20allows%20further%20customization%20of%20containers.%26nbsp%3B%20You%20can%20control%20how%20tightly%20the%20container%20bounds%20its%20contents%20by%20adjusting%20Margins%20or%20using%20the%20Fit%20to%20Contents%20command.%26nbsp%3B%20You%20can%20switch%20between%20different%20visual%20styles%20and%20change%20the%20position%20of%20the%20container%20heading.%26nbsp%3B%20It%20is%20also%20possible%20to%20lock%20the%20container%20to%20prevent%20shapes%20from%20being%20added%20or%20deleted.%3C%2FP%3E%0A%20%20%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fvisio%2FWindowsLiveWriter%2FOrganizingDiagramswithContainers_14057%2Fimage_8.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F43878iC305FED1606B03BA%22%20%2F%3E%20%3C%2FA%3E%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%20%3CP%3EThe%20primary%20benefit%20of%20Containers%20is%20that%20you%20get%20both%20a%20visual%20grouping%20and%20a%20logical%20grouping%20of%20shapes%20in%20your%20diagram.%26nbsp%3B%20Your%20diagram%20is%20more%20readable%20and%20looks%20professional.%26nbsp%3B%20Visio%20does%20all%20the%20work%20to%20keep%20things%20together.%26nbsp%3B%20You%20just%20need%20to%20decide%20which%20shapes%20belong%20in%20the%20container.%3C%2FP%3E%0A%20%20%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2FBlogFileStorage%2Fblogs_msdn%2Fvisio%2FWindowsLiveWriter%2FOrganizingDiagramswithContainers_14057%2Fimage_10.png%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F43879i95351B3474A457E6%22%20%2F%3E%20%3C%2FA%3E%3C%2FP%3E%0A%20%20%3CP%3EIn%20our%20next%20post%2C%20we%E2%80%99ll%20take%20a%20look%20at%20more%20capabilities%20of%20containers%20and%20how%20to%20create%20your%20own%20container%20shape.%26nbsp%3B%20Please%20tell%20us%20what%20you%20think%20about%20containers%20by%20using%20the%20%3CA%20href%3D%22http%3A%2F%2Fblogs.technet.com%2Foffice2010%2Farchive%2F2009%2F07%2F15%2Ftell-us-what-you-think-about-office-2010-technical-preview.aspx%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Send%20a%20Smile%20feedback%20tool%20%3C%2FA%3E%20or%20by%20commenting%20on%20this%20post.%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-237361%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Aug%2C%2025%202009%20As%20the%20Visio%20product%20team%20began%20planning%20for%20the%20Visio%202010%20release%2C%20we%20collected%20a%20lot%20of%20customer%20drawings.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-237361%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eall%20posts%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Evisio%202010%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on MSDN on Aug, 25 2009

As the Visio product team began planning for the Visio 2010 release, we collected a lot of customer drawings.  Even though there were many different types of diagrams represented, we found some similarities.  We noticed that as diagrams got more complex, users added special shapes to help keep things organized and understandable.  Often users drew boxes around clusters of shapes to define a logical grouping.  That got us thinking whether we could help with this kind of organization, and the Containers feature was born.

You’ve probably used something like a container in Visio already.  In the past, you would draw a rectangle around some shapes, choose Send to Back to move it behind the shapes, add a text label and position it near the rectangle edge, and finally group everything to keep the shapes together.  This works but it makes it hard to access the individual shapes, and you must ungroup and regroup every time the contents changed.

The Containers feature in Visio 2010 makes it easy to add a visual boundary around shapes, including a label.  Visio does all the work to maintain the relationship between the container and its contents.  To add a container to your diagram, first select the shapes to be contained.  Then choose the Container command from the Insert tab of the ribbon.  A gallery appears with several different container styles.  Click on a style to add the container to the diagram.

The shapes inside the container are not in a group, so you have direct access to continue working with them.  Shapes are added or removed simply by dragging them in or out of the container.  When dragging a shape, an orange highlight appears around the container to indicate that Visio will make the shape a member of the container.  The container can automatically grow or shrink as needed to fit the contents.  Moving, copying or deleting the container will move, copy or delete the contents as well.

Containers can be formatted just like regular shapes.  In particular the alignment of the heading is changed using the paragraph alignment buttons on the Home tab of the ribbon.  There is also a contextual tab that allows further customization of containers.  You can control how tightly the container bounds its contents by adjusting Margins or using the Fit to Contents command.  You can switch between different visual styles and change the position of the container heading.  It is also possible to lock the container to prevent shapes from being added or deleted.

The primary benefit of Containers is that you get both a visual grouping and a logical grouping of shapes in your diagram.  Your diagram is more readable and looks professional.  Visio does all the work to keep things together.  You just need to decide which shapes belong in the container.

In our next post, we’ll take a look at more capabilities of containers and how to create your own container shape.  Please tell us what you think about containers by using the Send a Smile feedback tool or by commenting on this post.