ButtonBar

ButtonBarAddItem

Append a menu item as a button on the bar

Syntax

Signature
xBool       ButtonBarAddItem( ButtonBar *buttonBar, MenuItem *item );

Arguments

buttonBar the button bar.

item the menu item to append. NULL or an item that owns a submenu is invalid.

Return value

T on success, or F if the object is NULL, item is NULL or item owns a submenu.

Description

The bar takes ownership on success. The caller retains ownership on failure. Use `MenuItemNewB()` to create a button with an action, or pass `MENU_SEPARATOR` as its caption to reserve a blank slot. Call `ButtonBarDisplay()` to redraw the bar after appending.

See also