Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!redcloud!clyne From: clyne@redcloud.ucar.edu (John Clyne) Newsgroups: comp.windows.x Subject: Instrinsics resource question Message-ID: <1489@ncar.ucar.edu> Date: 27 Feb 89 22:09:05 GMT Sender: news@ncar.ucar.edu Reply-To: clyne@redcloud.ucar.edu.UUCP () Organization: Scientific Computing Division/NCAR, Boulder CO Lines: 49 Hello, Can someone tell me why the following code fragment won't return the font used by the label widget? thanks in advance - jc Widget label; int n; XFontStruct font; | | | n = 0; XtSetArg(args[n], XtNlabel, "label"); n++; label = XtCreateManagedWidget( "label", labelWidgetClass, panel, args, n ); /* * get font */ n = 0; XtSetArg(args[n], XtNfont, &font); n++; XtGetValues(comm, args, n); /* * length of string in pixels */ width = XTextWidth(&font, "string", strlen("string"); John Clyne (clyne@bierstadt.ucar.edu) c/o National Center for Atmospheric Research P.O. Box 3000 Boulder, Colorado 80307 (303) 497-1236 %%% Its a small world. But I wouldn't want to paint it %%% S. Wright %%% %%%