Metro / Flat UI Tabs

I’ve had a request come in to see how to make the flat UI style tabs that are used in my Balanced Scorecard dashboard. Here is how you can make those tabs by layer core out-of-the-box components.

tabs10

First, we start with a simple box with a gray border and a white background.
draw_a_box

Then we create three tabs with the same gray border and a lighter gray background.
tabs1

Send those tabs behind the main area box to represented the deselected tabs.
tabs2

On top of the first tab, we place a white rectangle with no border. Make sure that it fits right into the area of the tab in the back, so it looks like they share a border. Then make this highlighted tab cross over the border or the main background.
tabs3

Next place a push button centered over the tab, making sure that the Text placement looks good. For this example I used a 16pt font.
tabs4

On the push button’s appearance tab, turn off the ‘show button background’ option.
tabs5

Repeat these steps for all three tabs. The background tabs go behind the main background area, then everything else is on top. The transparent buttons need to be on the top-most layer.
tabs6

Each tab has it’s own status and key. If the selected tab input (yellow cell; B2) equals the corresponding tab number, the status turns to 1.
tabs7

Each push button will move the corresponding tab number from column B (e.g. B6) into the selected tab input (B2).
tabs8

Finally, the tab highlights will reference the corresponding status/key to determine visibility.
tabs9

Once you have mastered this concept, you will actually find that using push buttons for tabs can be much more powerful than a simple label based menu. Basically push buttons can push multiple values for adjoining cells, so you could change tabs and select/clear drill-down values at the same time. Because this method uses standard components, it can also be used for dashboards using the SAP mobile BI app.

Click here to download the source XLF file!