Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!uokmax!alliant.backbone.uoknor.edu!jigang From: jigang@alliant.backbone.uoknor.edu (Jigang Yang) Newsgroups: comp.windows.x Subject: Colormap with widgets Keywords: Xt,widgets,colormaps Message-ID: <1991Jan17.173335.2260@uokmax.ecn.uoknor.edu> Date: 17 Jan 91 17:33:35 GMT Sender: news@uokmax.ecn.uoknor.edu (Nets) Reply-To: jigang@alliant.backbone.uoknor.edu.UUCP (Jigang Yang) Organization: Geosciences Computing Network, Univ. of Ok Lines: 26 I got problem about using colormaps with widgets. I first use : XCreateColormap() to create a new colormap and read all colors from default colormap and save them into new colormap. Then XInstallColormap(); Then create some widgets and attach them with some callbacks; Then the mainloop. In some callbacks, I change the RGB values of the new colormap(since it is installed, it should be the current colormap), and install it again. But I only see the widgets using the newly changed color when they are focused. For example, if you focus / click the button, the colormap is changed, and then it seems to use the original colormap again! Why!!! -- ---------------------------------------------------------------------- Jigang Yang | jigang@alliant.backbone.uoknor.edu Geosciences Computing Network | jigang@gcnuok.bitnet University of Oklahoma | Telphone: 405-325-5540