coltoff@PRC.Unisys.COM (Joel Coltoff) (08/05/88)
HELP, I'm getting very frustrated. I'm using Athena widgets with X11 for my user interface. Right now I'm in the learning stage and am trying to modify some simple example programs. One has a popup menu with three command buttons. They are stacked vertically. I can't get them to position themselves end to end. I've tried using XtSetArg(arg[0], XtNx, x_pos); and if I do a XtGetValues( button, arg, ONE); the x position is the value I set but the buttons still stack vertically. If I try and make the box widget that holds the buttons wide enough for them with a XtSetArg(arg[0], XtNwidth, plenty_wide ); I just get a core dump when XtCreateManagedWidget() is called. Can anyone offer some advice here on things to try? Thanks in advance. -- - Joel {psuvax1,sdcrdcf}!burdvax!coltoff (UUCP) coltoff@burdvax.prc.unisys.com (ARPA)
swick@ATHENA.MIT.EDU (Ralph R. Swick) (08/06/88)
Xaw/Box will _always_ try to resize itself to be the smallest size that will contain it's children with a width equal to its widest child (plus padding). It's up to the parent of the Box to impose some other constraints, such as an alternate width. In contrib/menus there is the beginning of a subclass of Box, MenuBox, which would have other options such as the horizontal placement you desire.