Path: utzoo!attcan!uunet!ezx!samborn From: samborn@ezx.sunrise.com (Kevin Samborn) Newsgroups: comp.windows.x Subject: Clarity About Resize Requests Message-ID: <1990Sep27.141905.7401@sunrise.com> Date: 27 Sep 90 14:19:05 GMT Sender: samborn@sunrise.com (Kevin Samborn) Organization: Sunrise Software Systems, Inc. Lines: 56 I do not really understand the fashion in which widgets resize themselves. What I am trying to do is change the background pixmap in a core widget, and have the form containing the core, and the shell above that resize to the size of the pixmap. { Pixmap newpixmap, pixmap; int i; int x, y; unsigned int width, height, bw, depth; unsigned int width_return, height_return; Window rr; Arg args[15]; XtGeometryResult result; XGetGeometry(XtDisplay(fullsizeform), newpixmap, &rr, &x, &y, &width, &height, &bw, &depth); pixmap = XCreatePixmap(XtDisplay(fullsizeform), XtWindow(widget), width, height, depth); XCopyArea(XtDisplay(fullsizeform), newpixmap, pixmap, myGC, 0, 0, width, height, 0, 0); newpixmap = full_size; full_size = pixmap; XtSetArg(args[0], XtNbackgroundPixmap, full_size); XtSetValues(graphic, args[0], 1); > i = 0; > XtSetArg(args[i], XtNwidth, width + 40); i++; > XtSetArg(args[i], XtNheight, height + 40); i++; > XtSetValues(fullsizeform, args, i); > or > > XtResizeWidget(fullsizeform, width, height, 0); > or > > result = XtMakeResizeRequest(fullsizeform, width, height, > &width_return, &height_return); > XFreePixmap(XtDisplay(fullsizeform), newpixmap); } This is pretty much the code I have used. As you can see, I am not sure whether to change the size with XtSetValues, XtMakeResizeRequest, or XtResizeWidget. Anyway, none of these changes the size of the widget. The hierarchy looks like this: A dialog shell->a form->a core. I want the whole window to change size to the new background pixmap. kevin samborn samborn@sunrise.com ...!uunet!ezx!samborn