Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!rutgers!iuvax!beckman From: beckman@iuvax.cs.indiana.edu (Peter Beckman) Newsgroups: comp.windows.x Subject: Xlib and Widgets, again Message-ID: <16672@iuvax.cs.indiana.edu> Date: 20 Jan 89 17:09:11 GMT Reply-To: beckman@iuvax.cs.indiana.edu (Peter Beckman) Organization: Indiana University, Bloomington Lines: 20 I am trying to use Xlib call to draw within a widget. Sorry for the confusion, I have tried lots of things, The one I thought had the most promise is listed below. After 8 hours, I started grasping at straws. Yes, the widget is realized before I draw to it. Any help would be appreciated. -Pete XtGCMask valuemask; XGCValues myXGCV; Display *dpy; Drawable win; GC gc; dpy = XtDisplay(Widget); myXGCV.foreground = WhitePixel(dpy, DefaultScreen(dpy)); myXGCV.background = BlackPixel(dpy, DefaultScreen(dpy)); valuemask = GCForeground | GCBackground; gc = XtGetGC(Widget, valuemask, &myXGCV); win = XtWindow(Widget); XFillRectangle(dpy,win,gc,0,0,400,400);