---
name: "attributes"
section: "3menu"
platform: "linux"
package: "ncurses-doc"
version: "6.5+20250216-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/attributes/3menu"
---

# attributes(3menu)

color and attribute control for menus

## 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

```
#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

**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

**These routines return one of the following:**

- **E\_OK**

  **The routine succeeded.**

- **E\_SYSTEM\_ERROR**

  **System error occurred (see [errno(3)](/errno/3.md)).**

- **E\_BAD\_ARGUMENT**

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

## PORTABILITY

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

## AUTHORS

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

## SEE ALSO

**ncurses(3NCURSES) and related pages whose names begin “menu\_”** **for detailed descriptions of the entry points.**
