Path: utzoo!attcan!uunet!nems!mimsy!haven!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!convex.UUCP!root From: root@convex.UUCP (Superuser) Newsgroups: comp.windows.x Subject: Lost mail for you Message-ID: <9006071721.AA14615@sushi> Date: 7 Jun 90 17:21:33 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 98 From pescadero.stanford.edu!expo.lcs.mit.edu!xpert-mailer Thu May 31 22:46:11 1990 remote from convex Received: by sushi (5.51/7.0) id AA24505; Thu, 31 May 90 22:46:11 CDT Received: by convex.COM (5.51/4.7) id AA09698; Thu, 31 May 90 22:46:06 CDT Received: from Erebus.Stanford.EDU by uxc.cso.uiuc.edu with SMTP (5.62+/IDA-1.2.8) id AA08530; Thu, 31 May 90 22:41:38 -0500 Received: from Hanauma.Stanford.EDU by erebus.Stanford.EDU with TCP; Thu, 31 May 90 20:28:02 PDT Received: by hanauma.stanford.edu (5.51/7.0) id AA04233; Thu, 31 May 90 20:41:27 PDT Received: from EXPO.LCS.MIT.EDU by Pescadero.Stanford.EDU (5.59/25-eef) id AA19850; Thu, 31 May 90 20:40:13 PDT Received: by expo.lcs.mit.edu; Thu, 31 May 90 17:56:57 EDT Received: from bach.cs.byu.edu by expo.lcs.mit.edu; Thu, 31 May 90 17:56:08 EDT Received: by bach.cs.byu.edu (5.57/Ultrix3.0-C) id AA08275; Thu, 31 May 90 15:54:49 MDT Date: Thu, 31 May 90 15:54:49 MDT From: convex!bach.cs.byu.edu!mike (Mike Burbidge) Message-Id: <9005312154.AA08275@bach.cs.byu.edu> To: motif-talk@osf.org Cc: xpert@expo.lcs.mit.edu Subject: Motif DrawingArea widget seems to ignore XmNresizePolicy widget? The motif DrawingArea widget has a resource named XmNresizePolicy. The documentation claims that it can be assigned three values: XmRESIZE_NONE, XmRESIZE_ANY, XmRESIZE_GROW. I created a SelectionBox widget whose working area widget is a DrawingArea widget with width and height 500 and XmNresizePolicy set to XmRESIZE_NONE. The manual puts (fixed size) next to XmRESIZE_NONE. I assume this means that the drawing area widget will ignore resize requests from its parents. Either I have misunderstood the short two word explaination for XmRESIZE_NONE, or else there is a bug somewhere. In either event the SelectionBox widget resizes the DrawingArea widget to 20x20. Below a short example program. ---------------------------------------------------------------------- #include #include #include #include #include #include #include #include main (int argc, char *argv[]) { Display *display; Widget appl_shell, dialog, selection, draw; XtAppContext context; Arg args[10]; int n; /* Initialize X11 and the Motif widget environment. */ XtToolkitInitialize (); context = XtCreateApplicationContext (); display = XtOpenDisplay (context, NULL, argv[0], "try", NULL, 0, &argc, argv); appl_shell = XtAppCreateShell (argv[0], "Root try", applicationShellWidgetClass, display, NULL, 0); XtResizeWidget (appl_shell, 5, 5, 1); n = 0; dialog = XmCreateDialogShell (appl_shell, "dialog", args, n); n = 0; XtSetArg (args[n], XmNdialogType, XmDIALOG_PROMPT), n++; selection = XtCreateWidget ("selection", xmSelectionBoxWidgetClass, dialog, args, n); n = 0; XtSetArg (args[n], XmNheight, 500), n++; XtSetArg (args[n], XmNwidth, 500), n++; XtSetArg (args[n], XmNresizePolicy, XmRESIZE_NONE), n++; draw = XmCreateDrawingArea (selection, "draw", args, n); XtManageChild (draw); XtManageChild (XmSelectionBoxGetChild (selection, XmDIALOG_APPLY_BUTTON)); XtUnmanageChild (XmSelectionBoxGetChild (selection, XmDIALOG_TEXT)); XtUnmanageChild (XmSelectionBoxGetChild (selection, XmDIALOG_SELECTION_LABEL)); XtUnmanageChild (XmSelectionBoxGetChild (selection, XmDIALOG_HELP_BUTTON)); XtManageChild (selection); XtManageChild (dialog); XtRealizeWidget (dialog); XtAppMainLoop (context); } ------------------------------------------------------------------ Could someone help me fix this program or give me an alternative so that the DrawingArea widget does not get resized! Mike Burbidge mike@bach.cs.byu.edu