🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #23737

Re: Keeping dialog widget from resizing

#23737
From: Donna Converse
Date: Fri, 14 Jun 1991 23:23
40 lines
2511 bytes
> I am writing an application in which I use the dialog widget from the Athena
> widget set.  I would like for the AsciiText child of the dialog widget to 
> remain fixed in size, both in height and width.  I thought I had found the
> proper way to do this when I read on page 104 of the Athena Widget Set - C
> Language Interface documentation:
> 
>   "If you wish to force the Dialog to never resize one or more of its 
>    children then set left and right to XawChainLeft and top and bottom to 
>    XawChainTop.  This will cause the child to remain a fixed distance from the
>    top and left edges of the Dialog, and to never resize."
> 
> I tried this and I can still type so many characters that the text widget
> extends to the right edge of the dialog widget and if I press RETURN it will 
> extend downward to the bottom of the dialog widget.  This may be because I'm 
> getting some sort of error.  In the application's resource file I have:  
> 
> Xwl*input_dialog*left:          XawChainLeft
> Xwl*input_dialog*right:         XawChainLeft
> Xwl*input_dialog*top:           XawChainTop
> Xwl*input_dialog*bottom:        XawChainTop
> 
> and when I run the program (xwl is the program's name) I get on stdout:
> 
> Warning: Cannot convert string "XawChainTop" to type edgeType
> Warning: Cannot convert string "XawChainLeft" to type edgeType
> 
> What's the deal?  Am I doing this wrong?

Yes, you're supposed to know (by osmosis, I suppose :-)) that when specifying
resources in a defaults file, as opposed to specifying resources in the 
application source code, to strip off the leading Xaw prefix of the
resource value before specifying it.  Try ChainLeft and ChainTop.
Actually capitalization doesn't matter here.

> If I am then why don't I get
> four error messages instead of two?

Xt resource conversion will give you one message per error, no matter
how many times the error occurs.  This is considered to be useful.
Technical Details
Message-ID: <9106142323.AA02149@excess.lcs.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!dont-send-mail-to-path-lines
References: <+r9kjrb@rpi.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!dont-send-mail-to-path-lines
From: converse@expo.lcs.mit.EDU (Donna Converse)
Newsgroups: comp.windows.x
Subject: Re: Keeping dialog widget from resizing
Message-ID: <9106142323.AA02149@excess.lcs.mit.edu>
Date: 14 Jun 91 23:23:38 GMT
References: <+r9kjrb@rpi.edu>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: X Consortium, MIT Laboratory for Computer Science
Lines: 40