Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: String to Pixmap conversion? Message-ID: <9002201908.AA22930@expo.lcs.mit.edu> Date: 20 Feb 90 19:08:15 GMT References: <163@ria.ccs.uwo.ca> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 34 > I follow this group fairly regularly and haven't seen this problem mentioned > so I'm wondering what I'm doing wrong. I am trying to set things up in > my .Xdefaults file so that Athena command widgets have a backgroundPixmap of > (for arguments purposes) gray1. I gather (rightly or wrongly ?) from the > manual that I can give the filename of the bitmap file I wish to be used as > the value for backgroundPixmap and there will be an automagic conversion > of String to Bitmap. The manual talks about String to Bitmap conversion > although the Type required is Pixmap. The server (or whatever) realizes > this and attempts to do the String to pixmap conversion and promptly > throws up the following: > Warning: No type converter registered for 'String' to 'Pixmap' conversion. > Where am I going wrong? The background pixmap of a window must be the same depth as the window to which it is to be assigned. Since there is not current standard way to convert a string into a pixmap of arbitrary depth neither the intrinsics or the Athena widgets define a string to pixmap converter. The Athena widgets do, however, define a string to Bitmap (1 bit deep Pixmap) converter. This converter takes the name of a bitmap file, and converts that to a 1 bit deep Pixmap. You are specifying the resource correctly, there just is no coverter defined (registered) that knows how to convert the string "gray1" into a pixmap of arbitrary depth. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213