I have an XRT/field widget with the following resources set:
XmNxrtFldMask, "????",
XmNxrtFldDefaultValue, "VGS1",
XmNxrtFldValidChars, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
XmNxrtFldCase, XRTFLD_CASE_UPPER,
My expectation is that any text entered will be converted to uppercase, however this is not occurring. Any lowercase characters entered are kept lowercase.
The setting of XmNxrtFldValidChars takes precedence over the XmNxrtFldCase resource. Since lowercase characters are in that resource value, lowercase characters are not converted.
You can work around this behaviour by setting a XmNxrtConvertCallback function which checks each keystroke, and converts it to uppercase. This is demonstrated in the attached sample code.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center