Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvlx!ben From: ben@hpcvlx.cv.hp.com (Benjamin Ellsworth) Newsgroups: comp.windows.x Subject: Re: XCreateGC vs XtGetGC Message-ID: <100920219@hpcvlx.cv.hp.com> Date: 26 May 90 01:24:53 GMT References: <25261@netnews.upenn.edu> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 16 > ...I suspect that I should call XCreateGC in the Realize method for > the widget, but wanted to know if that was correct. I don't know precisely what you are trying to do, but for most cases you are correct. As I'm sure you are aware, you need a window for XCreateGC, and you don't have one until the widget is realized. This behavior has bit many a beginning widget programmer (myself included). ----------------------------------------------------------------------- Benjamin Ellsworth | ben@cv.hp.com | INTERNET Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP 1000 N.E. Circle | (USA) (503) 750-4980 | FAX Corvallis, OR 97330 | (USA) (503) 757-2000 | VOICE ----------------------------------------------------------------------- All relevant disclaimers apply. -----------------------------------------------------------------------