This blog post is the fifth in a series of technical tips about the SolidWorks User Interface. Call the series "Everything you wanted to know about -----, but were afraid to ask". The first few posts will be about the various types of toolbars available in the system. This post is about Flyout Tool Buttons in SolidWorks.
Flyout Tool Buttons (or Toolbars Flyouts)
There are two general types of toolbar flyouts in SolidWorks.
- Toolbar associated flyouts- These flyouts are derived from the regular toolbars and were introduced in SolidWorks 2004. Think of these as taking a regular toolbar and embedding it into another toolbar as a single button. When you hit the button, it flies out a list of all of the commands that are defined on the regular toolbar associated with that flyout. To change the definition of the flyout, you simply make the regular toolbar visible, customize the buttons that are on that toolbar, and then hide the toolbar. Add-in toolbars, if implemented using the CommandManager APIs, automatically create a toolbar associated flyout for each API toolbar. The Reference Geometry and Curve toolbar flyouts as shown below are examples of toolbar associated flyouts that are shown on the Features tab of the CommandManager by default.
- Hard coded flyouts- These flyouts were introduced in SolidWorks 2008 to allow more flexibility in grouping similar commands together into single buttons. There is a predefined set of these flyouts in SolidWorks and they cannot at this time be customized by the user (although we are considering adding customizability in the future if there is enough demand). There are three different behaviors for these flyouts:
- Simple flyout- this type of flyout has one single behavior whether you hit the icon or arrow portion of the flyout (the mouse over effects only show one "hit" zone). The behavior is to always flyout and show the commands that are defined on the flyout (same behavior as the toolbar associated flyouts). The icon shown on the top level button is an icon chosen to represent all of the contents of the flyout. The View Settings flyout on the Heads-Up View Toolbar is an example of a simple flyout:
- Last used flyout- these flyouts have two zones on the top level button, one for the icon, and one for the arrow flyout. The icon portion always shows and executes the last command used from the flyout. The Line flyout on the sketch tab of the CommandManager is an example of a last used flyout:
- Most commonly used flyout- these flyouts have two zones on the top level button, one for the icon, and one for the arrow flyout. The icon portion always shows and executes the first command listed on the flyout. When we defined these flyouts, we put the most commonly used command of the group at the top of the flyout list. The Pattern flyout on the Features tab of the CommandManager is an example of a most commonly used flyout:
We chose to implement these three different behaviors so that we had flexibility depending on the type of commands on the flyout. Our research showed that the majority of users disliked the top level icon always changing to the most recently used command, especially in cases where the icons of the commands within the flyout are drastically different. In such cases, users would have trouble finding the button again once the icon changed. For cases where the icons are similar and there is no clear “winner” on the flyout as to what users would use most (such as rectangle), we used the "last used" type. For cases where there was clearly one type of command used more than others (such as Line vs. Construction Line or Convert Entities vs. Intersection Curve) we chose the "most common" type. The simple flyout is the least used but is used in cases where we want to group less commonly used commands under one button.
You add flyouts to the toolbars in the same manner as other toolbar buttons; drag/drop them from the Tools, Customize, Commands dialog. The flyouts are available from the “Toolbar Flyouts” category. The image below shows the customize dialog for the flyouts category and highlights the different types of flyouts (this is the order they are always shown in this dialog):
A general behavior of all toolbar flyouts is that only commands that are currently available show on the flyout; i.e. if a command is currently grayed out in the top level menus, it is completely hidden from the flyout. This is a similar behavior to the right mouse button context menus where unavailable commands are hidden.
Lastly, there are some other hard coded flyouts "sprinkled" throughout other toolbars in the system that have special behaviors and do not fall into the architecture described above. Examples of these are the Select, Undo and Redo flyouts in the Standard toolbar and the Change Suppression State button in the Assembly toolbar.
If users see anything I have missed about Toolbar Flyouts in this blog post, please comment and I will try to update the blog.
The following are previous blog posts about toolbars:
The next two topics in the series about toolbars will be:
Copyright © 2009 Dassault Systèmes SolidWorks Corp. All rights reserved.
Do not distribute or reproduce without the written consent of Dassault Systèmes SolidWorks Corp.