Toolbar widgets have support to items with menus.
This kind of item will display a menu when selected by the user.
Let's start populating a toolbar with some regular items, the same way we started Toolbar Example 2.
The only difference is that we'll keep the default shrink mode, that adds an item with a menu of hidden items.
So, a important thing to do is to set a parent for toolbar menus, or they will use the toolbar as parent, and its size will be restricted to that.
Not only items' menus will respect this parent, but also the own toolbar menu, used to show hidden items.
Next, let's add an item set to display a menu:
Now, to add two options to this item, we can get the menu object and use it as a regular elm_menu. See Menu example for more about menu widget.
See toolbar_example_03.c, whose window should look like this picture: