form\_field\_attributes(3X) Library calls form\_field\_attributes(3X)

# [NAME](#NAME)

**form\_field\_attributes** - color and attribute control for form fields

# [SYNOPSIS](#SYNOPSIS)

```
#include <form.h>
```

```
int set_field_fore(FIELD *field, chtype attr);
chtype field_fore(const FIELD *field);
```

```
int set_field_back(FIELD *field, chtype attr);
chtype field_back(const FIELD *field);
```

```
int set_field_pad(FIELD *field, int pad);
int field_pad(const FIELD *field);
```

# [DESCRIPTION](#DESCRIPTION)

The function **set\_field\_fore** sets the foreground attribute of *field*. This is the highlight used to display the field contents. The function **field\_fore** returns the foreground attribute. The default is **A\_STANDOUT**.

The function **set\_field\_back** sets the background attribute of *form*. This is the highlight used to display the extent fields in the form. The function **field\_back** returns the background attribute. The default is **A\_NORMAL**.

The function **set\_field\_pad** sets the character used to fill the field. The function **field\_pad** returns the given form'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\_BAD\_ARGUMENT**](#E_BAD_ARGUMENT)

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

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

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

# [PORTABILITY](#PORTABILITY)

These routines emulate the System V forms 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 “form\_” for detailed descriptions of the entry points.

2024-03-16 ncurses 6.6

---

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