Over the many, many years that I have been creating Microsoft Visio solutions, I have had to create numerous right-mouse context menus for shapes to control their Shape Data values. Over that time, patterns emerge, so this article is highlighting three different appearances for simple Boolean values, otherwise known as True/False or Yes/No values, and even for tristate Yes/No/Maybe. In fact, Visio presents you with Boolean as one of the eight types of data available on the Define Shape Data dialog, but there is no UI for creating accompanying right-mouse context menus except for the ShapeSheet window. However, I will show that using a Fixed List type is often preferable to a simple Boolean type.
The first thing you will notice about a Boolean data type in the Shape Data window is that it is presented with FALSE as the first option in the drop down list, then TRUE. This runs counter to the generally accepted order when speaking but it is because Visio sees 0 (zero) as FALSE and anything else as TRUE, with 1 (one) being the usual value. In fact, you can turn easily change FALSE to TRUE by using the NOT(…) function.
However, some clients prefer to have these options present as Yes/No, or even in a different language, such as Ja/Nein, so in this case I use a Fixed List data type with only two options.
So, the choice of which arrangement to use is down to how explicit you want to be, and how many other items there are on the right mouse menu.
In the ShapeSheet, I always have a User-Defined Cell row to store the index of the Fixed List type Shape Data rows. This value can then easily be used in the Checked column to display a tick if the relevant value is true. In addition, I always try to reference the Shape Data section Label and Format values to display in the Actions section Menu column.
The Fixed List approach has another advantage too, because a third option for either None or Maybe can be added, and this can be the default. So, I have included a ? as the first option, which is better than a space because a menu item requires some text. Of course, this cannot be done for actual Visio Boolean type rows.
These Maybe options means extra rows in the Actions section of the ShapeSheet, but it has the advantage that a user has to make a positive choice, rather than the accidently leaving a default erroneously.
It should be obvious by now, that a Fixed List can be used more than Boolean values, and the flyout children in the menu is almost always the best approach for longer lists.
Other useful articles
A visual exploration of Penrose Tiling in Visio
Maybe it is because I used to be a building architect, but I have always been fascinated by the relationship between numbers and visualisations. Perhaps the most famous one is the Golden Ratio which has been used as the basis of many building designs and art pieces. It is often recognised to create a harmony…
How SVG in Visio can cause a Shape.BoundingBox(…) error
I have used Visio’s Shape.BoundingBox(…) for many, many years and I cannot ever recall it failing, but I have now managed to create some shapes that cause it to error. This caused many hours of confusion, so I nearly abandoned using the method, until I discussed it with my fellow Visio MVP, John Goldsmith (see…
Jumping between Shapes in Visio
Many Visio diagrams get quite large, and sometimes it is useful to provide the ability to jump to another shape quickly in the same document, either on a different page or on the same one. Although there is an add-on provided in desktop Visio that is used by the Off-Page Reference shape provided in the…
Fixing dimensions of 2D shapes
I am often asked what makes Visio unique and makes it stand out from the crowd, especially in today’s online world. Well, I think there are many reasons, but one of them is the ability to create scaled drawings with parametric components of specific dimensions. This was crucial for my adoption of Visio back in…
Smart Radio Buttons and Check Boxes in Visio
A recent project requires an interactive tutorial within Microsoft Visio desktop where a lot of the questions need a single answer using radio buttons, or multiple-choice answers using check boxes. I thought that this would be a great use of the list containers capability because the questions and answers could be part of the container…
Using Button Face Ids in Visio
Microsoft Visio desktop has the ability to display icons from a built-in list of Office icons on Actions and Action Tags (nee Smart Tags). These can be set in the ShapeSheet by using the desired number from several thousand in the ButtonFace cell. Although there is the ability to add better icons using code, the…
