jamesm@gemma.cs.rpi.edu (Michael James) (06/15/91)
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? If I am then why don't I get four error messages instead of two? I am fairly new to X and widgets, so if I'm going about this in totally the wrong way, I'd appreciate someone pointing me in the right direction. Thanks in advance for your help. Sincerely, Mike --------------------------------------------------------------------------- Mike James Rensselaer Polytechnic Institute jamesm@turing.cs.rpi.edu ---------------------------------------------------------------------------
converse@expo.lcs.mit.EDU (Donna Converse) (06/15/91)
> 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.