XMTEXTFIELDSETMAXLENGTH(3)
β¨ NAME β¨
XmTextFieldSetMaxLength β bestie, this is a TextField function that sets the value of the current maximum allowable length of a text string entered from the keyboard π
πΈ SYNOPSIS πΈ
#include <Xm/TextF.h>
void XmTextFieldSetMaxLength(
Widget widget,
int max_length);
π DESCRIPTION π
Okay so XmTextFieldSetMaxLength sets the value of the current maximum allowable length of the text string in the TextField widget. Slay. What that means is: this max allowable length is the thing stopping your user from typing a text string from the keyboard that's bigger than the limit. It's giving bouncer at the club door π«β β keyboard input over the limit simply does not get in.
BUT. Not me having to tell you this: strings that get entered using theXmNvalueresource (orXmNvalueWcs), or via theXmTextFieldSetStringfunction (orXmTextFieldSetStringWcs) ignore this resource entirely. They walk right past the bouncer, no cap π So don't come crying to me when your programmatically-set string is longer thanmax_lengthβ that's literally documented behaviour, iykyk.
Here's the breakdown of the args, because we respect our parameters in this house π«Ά
widgetβ specifies the TextField widget IDmax_lengthβ specifies the maximum allowable length of the text string
And if you want the complete definition of TextField and all its associated resources, go read XmTextField(3). Main character reading list, fr fr π
π¦ RELATED π¦
And that's the whole page, bestie π go forth and cap those lengths. This little love letter came to you straight from the XmTextFieldSetMaxLength(library call) man page β that's the source and the vibe, periodt. πβ¨
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms