Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: (none) Message-ID: <8910161721.AA01972@expo.lcs.mit.edu> Date: 16 Oct 89 17:21:33 GMT References: <8910161628.AA00850@ipsun.larc.nasa.gov> Sender: news@bloom-beacon.MIT.EDU Organization: The Internet Lines: 64 > This may be a stupid question, but I'll ask it anyway!! Not at all. > I don't know how to keep children of an Athena form widget from being > resized ( by the window manager). I tried using XtNresizable set to False. > Can someone tell me how I'm flailing???? Thanks in advance. Set XtNtop and XtNbottom to ChainTop and XtNleft and XtNright to ChainLeft. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213 ---------------------------------------------------------------- [ Here is some more info that may be of help. From my postion to xpert on Dec. 16 1988 ] The form widget is a slippery character and is difficult to describe and understand, we are looking into getting something better, but for a while for doing general widget layout the form is it. So to let people use it more effectively I will try to give a better explanation of its use. The form has two distinct methods of laying itself out. Method 1 never resizes the children of the form, and just attempts to place them in next to each other like building blocks, according to the resources shown below. The FromVert resource is used to place this widget directly below one of its siblings. The fromHoriz resource is used to place this widget directly to the right of one of its siblings. This method is used when managing and unmanaging children, and processing childrens geometry requests. Method 2 may resize children if the XtNresizable constraint resouce is set for that child. This method takes each edge of each child, and moves it appropriately, for instance in the above example you may want to chain both the top and bottom edges of the lable widget to the top of the form. This will of course keep it from changing size, and both edges are fixed to the top of the form. For really strange behavior you can chain the top of a widget to the bottom of the form, and the bottom of a widget to the top of the form. This method is only used when the form is told to resize itself by its parent. Resources for each method of laying out the form widgets children. Method 1 Method 2 -------------------------------------------------------------- XtNfromVert XtNbottom XtNfromHoriz XtNtop XtNhorizDistance XtNleft XtNvertDistance XtNright XtNresizeable Back to the specific question: The only what to get the label widget to go all the way across the form like you are asking is to size it appropriately. This can be done by querying the daughter form widgets of their sizes (a call to XtFormDoLayout may be necessary) and the label widget of its XtNhorizDistance resource, and adding them all together as the correct size of the label widget.