When the ribbon was introduced in LT 2009, it included a limited number of contextual tabs, which are tabs that appear only when a certain command is active or a certain object is selected.
LT 2010 expanded on this idea, adding more built-in states and enabling you to personalize several others. Here's how it works.
In the CUI Editor, under the Ribbon node, you'll find a list of possible Contextual Tab States. Most of them are in the format "<Object> selected", although there are a few "<Environment> mode" and "<Command> in progress" states as well.
For each state, you can assign one or more tabs to appear, either as a separate tab or merged with whatever tab is active at the time.
As an example, let's take a look at the "Block Editor mode" state.
It has two tabs in it, the "Block Editor Contextual Tab" and the "Block Editor - Close Contextual Merged Tab". The first tab is set to display type "full". That means that it gets a separate green-shaded tab next to the others (like Home and Annotate), and hides its tools when it's not in use.
The second contextual tab, though, is set to "merged", which means it gets tacked on to the end of the active tab. Notice that the "Close Block Editor" panel is still visible in the image below, even though the main Block Editor tab isn't active.
A bunch of states are pre-populated with tabs:
- Block Editor mode
- DGN Underlay selected
- DWF Underlay selected
- External Reference selected
- Image selected
- PDF Underlay selected
- Reference Editing mode
- Table cell(s) selected
- Test Block mode
- Text Editor in progress
But the rest are ready and waiting for you to define your own. And fortunately, doing so is pretty simple. All you need to do is drag-and-drop the tab you want onto the appropriate state. So I can drag the Home tab over to the "Arc selected" state...
...and like magic, the Home tab appears when I select an arc, no matter what tab was current before.
(Yes, it does actually appear twice. No big deal, since the green one will go away as soon as the arc is deselected.)
You can also easily create your own tabs to further personalize the tools in your contextual tab states. Just right-click on the Tabs node, select "New Tab", and drag-and-drop panels onto it until you have the tools you need. Then drag-and-drop your new tab onto a contextual tab state.
For example, I made a new tab that I called "Modify Properties", and added the Modify and Properties panels to it. (Creative naming, hmm?) I also set its Display Type property to Merge, so that it would combine itself with whatever tab is active, and dropped it into the "Circle selected" state. Now see what happens when I select a circle:
See how the two panels I added to my contextual tab just appear next to whatever panels belong to teh actual current tab? Pretty neat, isn't it? It's a super-quick and easy way to make the ribbon work for you.