[comp.windows.x.motif] Dialog Placement Question

mfeldman@zodiac.ads.com (Mike Feldman) (03/08/91)

every thing else in the program works ok.  i'm try to place the dialog box
on the screen with the right dimensions so that all the buttons are visible.
the default dialog pops up about 100x220 pixel (or thereabouts).  using a
resource file i could get it to look good, but with strange behavior.  i could
set the x and y resources ok if the defaultPosition is false - that's fine.
the height and width was the problem.  no combination of the XtSetArgs seemed
to take effect for the height and width, but it did work for the default
position.  i also tried XtSetValues after creating sure_box with unsuccessful
results. setting the height with resources works with *sure_box*height: 100,
but not with *sure_box.height: 100.  this basically makes the popup window
about 220x220 pixels wide and close to square - which makes all the pushbuttons
in it appear.  also *sure_box*width and *sure_box.width seem to have no effect.
changing the height resource just made the size of the contents of the popup
change, but the size of the popup window itself didn't change much (though it
did change).  in other words, the larget i set the *height resource, the larger
i'd have to resize the popup window to have all the buttons in it positioned
properly.  a height of 100 worked best.

so, what resources do i set?  and how can i do it from within the program?

thanks much in advance,
mike
mfeldman@ads.com

------------------------------------------------------------

****************** the code section in question ************
  n = 0;
  XtSetArg(args[n], XmNautoUnmanage, FALSE); n++;
/*  XtSetArg(args[n], XmNdefaultPosition, FALSE); n++;
  XtSetArg(args[n], XmNwidth, 222); n++;
  XtSetArg(args[n], XmNheight, 222); n++;
  XtSetArg(args[n], XmNx, 100); n++;
  XtSetArg(args[n], XmNy, 100); n++;*/
  XtSetArg(args[n], XmNmessageString,
	   XmStringCreate("Are you really sure?",XmSTRING_DEFAULT_CHARSET));
  n++;
  sure_box = XmCreateQuestionDialog(toplevel,"sure_box",args,n);

----------------------------------------------------------------

!
! resource file
!

*sure_box*height: 100

!*sure_box*default_Position: false
!*sure_box.x: 200
!*sure_box.y: 200