🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #37064

Re: Dialog

#37064
From: Chris D. Peterson
Date: Tue, 20 Feb 1990 21:01
28 lines
1770 bytes
> "XtNmaximumlength" resource (dialogWidgetClass) was convenient for me
> to prevent the input box from growing too much. Is there a new way to
> do so using X11R4 Athena's widgets ?

The "maximuLength" resource was previously used to make sure that you did not go
off the end of the array of characters allocated for the "value" resource. 
Since the R4 Text (and Dialog) widgets now manage this memory for you there is
no need for this constraint.  So I removed the maximumLength resource.

There is no simple way to do what you want, but the method described below
should do the trick.  You also can create your own "Dialog" widget by using
a Form, an AsciiText, and a few buttons to get more complex behavior.

To set a max length for the Dialog, you need to modify its "value" widget.  You
can get the "value" widget from the Dialog with XtNameToWidget(), and modify its
resources to set the "useStringInPlace" resource to TRUE.  When using this mode
you have to specify the length of the buffer, as in the R3 Text widget.  This
has the side effect of keeping your text input field smaller than "length"
characters.  Take a look at Chapter 5 of the Athena Widget documentation for
details.

						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213
Technical Details
Message-ID: <9002202101.AA24419@expo.lcs.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!kit
References: <369@servix.cicb.fr>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!kit
From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson)
Newsgroups: comp.windows.x
Subject: Re: Dialog
Message-ID: <9002202101.AA24419@expo.lcs.mit.edu>
Date: 20 Feb 90 21:01:05 GMT
References: <369@servix.cicb.fr>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 28