Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!math.lsa.umich.edu!zaphod.mps.ohio-state.edu!think!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: trouble with bitmaps under Aw Message-ID: <9002151355.AA11371@expo.lcs.mit.edu> Date: 15 Feb 90 13:55:26 GMT References: <17769@eerie.acsu.Buffalo.EDU> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 35 > I've just started using the Athena widgets and the Xtoolkit. So much easier > than trying to get everything going with just Xlib! > I'm having problems getting a bitmap to display in a widget. There are no > examples to do this in the manuals, or in the example code supplied. There is a string to bitmap converter registered in the Athena widgets. The string is a filename that corrosponds to a file in the format produced by XWriteBitmapFile. As an example try the following: % cd /x/examples/Xaw % xlabel -xrm "*label*bitmap:xlogo64" For specifics on how the Athena string to bitmap converter works see the Athena widget documentation section 2.4.3. > What i'm trying to do is have a label widget with a bitmap. Do i have to > do resource conversions? Are there any toolkit functions to help with > this. With Xlib i used to do an XCreateImage, and then PutPixel them > onto the window. There must be an easier simpler way under Aw. You can also use the SetValues() interface to place a pixmap of arbitrary depth into the Label widget's XtNbitmap resource. How you create this pixmap is up to you, there a no tools provided by Xt, so you are relegated to using XLib calls. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213