rgg@comp.lancs.ac.uk (Roger Garside) (05/31/90)
In X-windows V11R3 I used the resource "XtNmaximumLength" in an Athena dialog widget, to limit the mount of text which the user could type in. This resource does not appear to be available on R4. How can I achieve the same effect?
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (06/01/90)
> In X-windows V11R3 I used the resource "XtNmaximumLength" in an Athena dialog > widget, to limit the mount of text which the user could type in. This resource > does not appear to be available on R4. How can I achieve the same effect? The short answer is: not using the dialog widget. The original "length" resource was used to make sure that the Text widget used by the Dialog did not run off the end of its allocated buffer. The R4 Text widget performs memory management for you, and thus there is no limit on the length of the string. I removed this resource because I assumed that it was no longer useful. If you are willing to create your own "dialog" using the Form widget, you can set the Text widget's "useStringInPlace" resource. This resource forces the Text widget to use a pre-allocated string of fixed size. Creating your own dialog would involve placing a Label, a Text, and some Command widgets inside a Form widget. It may be possible to just modify the Text widget used by the dialog, but I wouldn't want to suggest that without trying it, I can think of some things that may cause you problems. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213