Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!samsung!uakari.primate.wisc.edu!ames!purdue!mentor.cc.purdue.edu!noose.ecn.purdue.edu!news From: luj@gus2.ecn.purdue.edu (Jun Lu) Newsgroups: comp.windows.x Subject: Constrain Resource of Xaw form widget Message-ID: <1990Jul16.033753.2169@ecn.purdue.edu> Date: 16 Jul 90 03:37:53 GMT Sender: news@ecn.purdue.edu (USENET news) Organization: Purdue University Engineering Computer Network Lines: 73 I just started to explore the Athena widgets. Please forgive me if this question has been asked before. Scenerio: ------- I wanted to create a "window" consisting of a menu bar and a graphics "window" into which I can draw something. After looking at example programm xwidgets.c, I decided to implement above idea in the following way(using Athena widgets): top | | Paned / \ _______/ \_____ | | Form widget Viewport | MenuButton | SimpleMenu | SmeBSB By specifying width and height resources for the viewport widget, I did get a large "window" with a menu and a blank "aera". Question/Problem: --------------- Now if I resize the "window" , the form widget resiezes its children, therefore sometimes I got a *big* menu "title". What I want is to disable the children autosizing feature of the form widget. I've tried to set the constraint resources of the form widget using: 1)fallback resources: String fallback_resources[] = { /* ... */ "*Form*top: XawChainTop", /* ... */ } When I ran the compiled code, I got Warning: Cannot convert string "XawChainTop " to type edgeType 2) XtSetArg when creating the form widget /* ... */ i = 0; XtSetArg( args[i], XtNleft, "XawChainLeft" ); i++; /* ... */ menuForm = XtCreateManagedWidget("menuForm", formWidgetClass, parent, args, i ); /* ... */ If I unquote "XawChainLeft" I got compiling error: `XawChainLeft' undeclared. Grepping XawChainLeft/XawRubber in the X11/Xaw/*.h were fruitless: they do not exist ! How should I solve this problem. Do I miss something here ? Any pointers and help would be appreciated. --Jun -- /* Jun Lu, School of Aeronautics and Astronautics */ /* Purdue University, West Lafayette, IN 47907 */ /* Internet: luj@ecn.purdue.edu Bitnet: luj%ecn.purdue.edu@purccvm */ /* UUCP: pur-ee!luj Phone: 317-494-7864 Fax: 317-494-0307 */