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

# XmDataFieldSetString(3)

A DataField function that sets the string value

## NAME

**XmDataFieldSetString** — A DataField function that sets the string value

## SYNOPSIS

```
#include <Xm/DataF.h>
void XmDataFieldSetString(
Widget widget,
char * value);
```

## DESCRIPTION

**XmDataFieldSetString** sets the string value of the DataField widget. This routine calls the widget's **XmNvalueChangedCallback** and verification callbacks, either **XmNmodifyVerifyCallback** or **XmNmodifyVerifyCallbackWcs**, or both. If both verification callback lists are registered, the procedures of the **XmNmodifyVerifyCallback** list are executed first and the resulting data is passed to the **XmNmodifyVerifyCallbackWcs** callbacks. It also sets the insertion cursor position to the beginning of the string and calls the widget's **XmNmotionVerifyCallback** callbacks.

- *widget*

  Specifies the DataField widget ID

- *value*

  Specifies the character pointer to the string value and places the string into the text edit window

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

## RELATED

[**XmDataField**(3)](/XmDataField/3.md) and **XmDataFieldSetStringWcs**(3).
