Path: utzoo!attcan!uunet!husc6!mailrus!ames!sgi!daisy!turner From: turner@daisy.UUCP (D'arc Angel) Newsgroups: comp.windows.x Subject: HP Widgets questions Message-ID: <1263@daisy.UUCP> Date: 13 Jun 88 21:43:49 GMT Organization: The Houses of the Holy Lines: 59 A couple of questions from a first time user of widgets 1. I define a title bar to span a form widget as follows: /*** TitleBar ***/ static Arg arglist2[] = { {XtNxRefName, (XtArgVal) "Xrolo"}, {XtNyRefName, (XtArgVal) "Xrolo"}, {XtNstring, (XtArgVal) titleString}, {XtNxAttachRight, (XtArgVal) TRUE}, {XtNxAttachOffset, (XtArgVal) 5}, {XtNxReE}, }; . . /*** set up the widgets ***/ toplevel=XtInitialize("main","ROlo",NULL,NULL,&argc,argv); form1 = XtCreateManagedWidget ("Xrolo", XwformWidgetClass, toplevel, (ArgList) arglist1, 0); tbar1 = XtCreateManagedWidget ("title1", XwtitlebarWidgetClass, form1, (ArgList) arglist2, XtNumber(arglist2)); The title bar gets truncated on the right by the form1 widget, shouldn't the form widget resize itself to fit the full titlebar ? 2. Also in the same code if I use {XtNxRefWidget (XtArgVal) form1}, in arglist2, I get a segv error, if I use {XtNxRefWidget (XtArgVal) &form1}, I get an error msg from XCreateManagedWidget, saying that the referenced widget is not a form or child of the form. I'm confused, RefName works perfect. The full program is fairly large so I have omitted it but (hopefully) included enough info here, toplevel, form1 and tbar1 are all declared as Widget (not Widget *). -- Don't you think that Mahitabel is a bit too toujour gay? - Archie ...{decwrl|ucbvax}!imagen!atari!daisy!turner (James M. Turner) Daisy Systems, 700 E. Middlefield Rd, P.O. Box 7006, Mountain View CA 94039-7006. (415)960-0123