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

# XmGetTabGroup(3)

Returns the widget ID of a tab group

## NAME

**XmGetTabGroup** — Returns the widget ID of a tab group

## SYNOPSIS

```
#include <Xm/Xm.h>
Widget XmGetTabGroup(
Widget widget);
```

## DESCRIPTION

**XmGetTabGroup** returns the widget ID of the tab group that contains the specified widget.

- *widget*

  Specifies a widget ID within a tab group

## RETURN

Returns the widget ID of a tab group or shell, determined as follows:

- •

  If *widget* is a tab group or shell, returns *widget*

- •

  If neither *widget* nor any ancestor up to the nearest shell is a tab group, returns the nearest ancestor of *widget* that is a shell

- •

  Otherwise, returns the nearest ancestor of *widget* that is a tab group

## RELATED

[**XmAddTabGroup**(3)](/XmAddTabGroup/3.md), [**XmManager**(3)](/XmManager/3.md), and [**XmPrimitive**(3)](/XmPrimitive/3.md).
