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

# XmTextSetTopCharacter(3)

A Text function that sets the position of the first character displayed

## NAME

**XmTextSetTopCharacter** — A Text function that sets the position of the first character displayed

## SYNOPSIS

```
#include <Xm/Text.h>
void XmTextSetTopCharacter(
Widget widget,
XmTextPosition top_character);
```

## DESCRIPTION

**XmTextSetTopCharacter** sets the position of the text at the top of the Text widget. If the **XmNeditMode** is **XmMULTI\_LINE\_EDIT**, the line of text that contains *top\_character* is displayed at the top of the widget without the text shifting left or right. If the edit mode is **XmSINGLE\_LINE\_EDIT**, the text moves horizontally so that *top\_character* is the first character displayed.

- *widget*

  Specifies the Text widget ID

- *top\_character*

  Specifies the position in the text to display at the top of the widget. This is an integer number of characters from the beginning of the text buffer. The first character position is 0 (zero).

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

## RELATED

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