mitem\_value(3X) Library calls mitem\_value(3X)

# [NAME](#NAME)

**set\_item\_value**, **item\_value** - set and get menu item values

# [SYNOPSIS](#SYNOPSIS)

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

```
int set_item_value(ITEM *item, bool value);
bool item_value(const ITEM *item);
```

# [DESCRIPTION](#DESCRIPTION)

If you turn off the menu option **O\_ONEVALUE** (e.g., with **set\_menu\_opts** or **menu\_opts\_off**; see [**menu\_opts**(3X)](/man/os/ncurses/menu_opts.3X)), the menu becomes multi-valued; that is, more than one item may simultaneously be selected.

In a multi\_valued menu, you can used **set\_item\_value** to select the given menu item (second argument **TRUE**) or deselect it (second argument **FALSE**).

# [RETURN VALUE](#RETURN_VALUE)

The function **set\_item\_value** returns 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\_REQUEST\_DENIED**](#E_REQUEST_DENIED)

The menu driver could not process the request.

# [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), [**menu**(3X)](/man/os/ncurses/menu.3X)

2024-03-16 ncurses 6.6

---

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