menu\_attributes(3X) Library calls menu\_attributes(3X)

# [NAME](#NAME)

**menu\_back**, **menu\_fore**, **menu\_grey**, **menu\_pad**, **set\_menu\_back**, **set\_menu\_fore**, **set\_menu\_grey**, **set\_menu\_pad** - color and attribute control for menus

# [SYNOPSIS](#SYNOPSIS)

```
#include <menu.h>
```

```
int set_menu_fore(MENU *menu, chtype attr);
chtype menu_fore(const MENU *menu);
```

```
int set_menu_back(MENU *menu, chtype attr);
chtype menu_back(const MENU *menu);
```

```
int set_menu_grey(MENU *menu, chtype attr);
chtype menu_grey(const MENU *menu);
```

```
int set_menu_pad(MENU *menu, int pad);
int menu_pad(const MENU *menu);
```

# [DESCRIPTION](#DESCRIPTION)

The function **set\_menu\_fore** sets the foreground attribute of *menu*. This is the highlight used for selected menu items. **menu\_fore** returns the foreground attribute. The default is **A\_REVERSE**.

The function **set\_menu\_back** sets the background attribute of *menu*. This is the highlight used for selectable (but not currently selected) menu items. The function **menu\_back** returns the background attribute. The default is **A\_NORMAL**.

The function **set\_menu\_grey** sets the grey attribute of *menu*. This is the highlight used for un-selectable menu items in menus that permit more than one selection. The function **menu\_grey** returns the grey attribute. The default is **A\_UNDERLINE**.

The function **set\_menu\_pad** sets the character used to fill the space between the name and description parts of a menu item. **menu\_pad** returns the given menu's pad character. The default is a blank.

# [RETURN VALUE](#RETURN_VALUE)

These routines return one of the following:

[**E\_OK**](#E_OK)

The routine succeeded.

[**E\_SYSTEM\_ERROR**](#E_SYSTEM_ERROR)

System error occurred (see [**errno**(3)](/man/os/ncurses/errno.3)).

[**E\_BAD\_ARGUMENT**](#E_BAD_ARGUMENT)

Routine detected an incorrect or out-of-range argument.

# [PORTABILITY](#PORTABILITY)

These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions.

# [AUTHORS](#AUTHORS)

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond.

# [SEE ALSO](#SEE_ALSO)

[**curses**(3X)](/man/os/ncurses/curses.3X) and related pages whose names begin “menu\_” for detailed descriptions of the entry points.

2024-03-16 ncurses 6.6

---

Document: set_menu_back(3x) from ncurses 6.6.20260926-r0 (Chainguard OS)
Source: https://github.com/ThomasDickey/ncurses-snapshots
