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

# XmTabListReplacePositions(3)

A convenience function that creates a new tab list with replacement tabs

## NAME

**XmTabListReplacePositions** — A convenience function that creates a new tab list with replacement tabs

## SYNOPSIS

```
#include <Xm/Xm.h>
XmTabList XmTabListReplacePositions(
XmTabList oldlist,
Cardinal *position_list,
XmTab *tabs,
Cardinal tab_count);
```

## DESCRIPTION

**XmTabListReplacePositions** creates a new tab list that contains the contents of *oldlist*, but with the tabs at the positions in *position\_list* replaced with copies of the corresponding tabs in *tabs*. A warning message is displayed if a specified position is invalid; for example, if the value is a number greater than the number of tabs in the tab list.

This function deallocates the original tab list after extracting the required information. It is the caller's responsibility to free the tabs in *tabs* by using the **XmTabFree** function.

- *oldlist*

  Specifies the tab list. The function deallocates the tab list after extracting the required information.

- *position\_list*

  Specifies an array of positions of the tabs to be replaced. The position of the first tab is 0 (zero), the position of the second tab is 1, and so on.

- *tabs*

  Specifies an array of the replacement tabs.

- *tab\_count*

  Specifies the number of elements in *position\_list* and *tabs*.

## RETURN

If *tabs*, *oldlist*, or *position\_list* is NULL, or *tab\_count* is 0 (zero), returns *oldlist*. Otherwise, this function returns the new tab list. The function allocates space to hold the returned tab list. The application is responsible for managing the allocated space. The application can recover the allocated space by calling **XmTabListFree**.

## RELATED

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