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

# XmListReplaceItemsUnselected(3)

A List function that replaces items in a list

## NAME

**XmListReplaceItemsUnselected** — A List function that replaces items in a list

## SYNOPSIS

```
#include <Xm/List.h>
void XmListReplaceItemsUnselected(
Widget widget,
XmString *old_items,
int item_count,
XmString *new_items);
```

## DESCRIPTION

**XmListReplaceItemsUnselected** replaces each specified item in the list with a corresponding new item. The replacement items remain unselected, even if they currently appear in the **XmNselectedItems** list.

- *widget*

  Specifies the ID of the List widget to replace items in.

- *old\_items*

  Specifies a pointer to the list items to be replaced.

- *item\_count*

  Specifies the number of elements in *old\_items* and *new\_items*. This number must be nonnegative.

- *new\_items*

  Specifies a pointer to the replacement items. Every occurrence of each element of *old\_items* is replaced with the corresponding element from *new\_items*. That is, the first element of *old\_items* is replaced with the first element of *new\_items*. The second element of *old\_items* is replaced with the second element of *new\_items*, and so on until *item\_count* is reached. If an element in *old\_items* does not exist in the list, the corresponding entry in *new\_items* is skipped.

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

## RELATED

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