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

# XmContainerReorder(3)

Container widget function to reorder children

## NAME

**XmContainerReorder** — Container widget function to reorder children

## SYNOPSIS

```
#include <Xm/Container.h>
void XmContainerReorder(
Widget container,
WidgetList widgets,
int num_widgets);
```

## DESCRIPTION

**XmContainerReorder** obtains the **XmNpositionIndex** constraint resources of each widget specified in *widgets*, sorts them in ascending order, and inserts the **XmNpositionIndex** constraint resources in the new order into each widget. If the **XmNlayoutType** resource of Container is **XmOUTLINE** or **XmDETAIL**, **XmContainerReorder** will force a layout of all items.

- *container*

  Specifies the Container widget ID.

- *widgets*

  Specifies an array of widget children of *container*.

- *num\_widgets*

  Specifies the number of items in the *widgets* array.

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

## RELATED

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