FileMaker 14’s new button bar is getting a lot of deserved attention. Designed with the developer in mind, it speeds the process of building great looking, light weight (from a CSS standpoint) button bars that are easy to configure and to resize on the fly. Not to mention the ease of hiding segments as conditions dictate.
Weihoa Ding, of DB Services, dives deeper into the features of the button bar:
Button Bar Setup
Double clicking on a button bar will pop up the “Button Bar Setup” dialog. Since a button bar is a collection of buttons and popover buttons, the setup dialog for a button bar is quite similar to the one for buttons and popover buttons.
1. Alignment of segments (section 1 in screenshot to the right). This is used to specify the alignment of segments. Your segments in a button bar can either be aligned horizontally or vertically.
2. Active segment (section 2). This is used to select active segment. Active segment selection will affect the segments’ appearance. We will talk about that in the next section. One thing to notice about active segment selection is, you can use a calculation to choose the active segment dynamically. In the use case for navigation bar we can use this calculation to have the active segment be selected according to the context of the layout.
3. Add or delete segments and choose a specific segment (section 3). Choosing a specific segment allows you configure it using sections down below.
4. Type (section 4). Once a segment is selected, its type can be configured either as a button or a popover button using the drop down list shown in section 4. The rest of the button bar will change elements it contains to reflect this choice….
Hiding A Segment
Hidden object behavior for a button bar is configured at the segment level. This means each segment can be hidden independently. So when a segment is hidden, the rest segments will resize to fill in the space left by it. In this way, you won’t have a gap on your button bar when you need to hide segment in some situations.
We will use a function bar as an example. We have segments that we only want to show in Browse Mode (“Find”, “Show All”, “Duplicate”), segments just for Find Mode (“Perform Find” and “Cancel Find”) and segments that work in both modes (“New” and “Delete”). After setting their hiding conditions separately, here is what it looks like in Layout Mode:
The total length of the button bar remains the same.