---
name: "XmListYToPos"
section: "3"
platform: "linux"
package: "openmotif"
version: "2.3.8-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XmListYToPos"
---

# XmListYToPos(3)

A List function that returns the position of the item at a specified y-coordinate

## NAME

**XmListYToPos** — A List function that returns the position of the item at a specified y-coordinate

## SYNOPSIS

```
#include <Xm/List.h>
int XmListYToPos(
Widget widget,
Position y);
```

## DESCRIPTION

**XmListYToPos** returns the position of the item at the given y-coordinate within the list.

- *widget*

  Specifies the ID of the List widget

- *y*

  Specifies the y-coordinate in the list's coordinate system

For a complete definition of List and its associated resources, see [**XmList**(3)](/XmList/3.md).

## RETURN

Returns the position of the item at the specified y coordinate. A value of 1 indicates the first item in the list; a value of 2 indicates the second item; and so on. A value of 0 (zero) indicates that no item exists at the specified y coordinate.

## RELATED

[**XmList**(3)](/XmList/3.md) and [**XmListPosToBounds**(3)](/XmListPosToBounds/3.md).
