Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!MYCROFT.MAYO.EDU!bmcprog From: bmcprog@MYCROFT.MAYO.EDU Newsgroups: comp.windows.x Subject: command widget bitmaps. Message-ID: <9003022032.AA02828@mycroft.mayo.edu> Date: 2 Mar 90 20:32:00 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 41 I am trying to use a bitmap instead of a label in a command widget. I had assumed that one could set the bitmap in the same manner as a label so I used: num_args = 0; no_obj = XCreateBitmapFromData (XtDisplay(parent), DefaultRootWindow (XtDisplay(parent)), no_obj_bits, no_obj_width, no_obj_height); XtSetArg (args[num_args], XtNbitmap, no_obj); num_args++; m_obj = XtCreateManagedWidget ("object", commandWidgetClass, parent, args, num_args); XFreePixmap (XtDisplay(parent), no_obj); As the code to set and create the widget. When I run a test of this code, I get: X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) Major opcode of failed request: 63 (X_CopyPlane) Minor opcode of failed request: 0 Resource id in failed request: 0x1000019 Serial number of failed request: 102 Current serial number in output stream: 107 Question: What is the correct way to set a bitmap in a command widget? I'd RTFM, but my copy of Athena Widget Set - C Language Interface (X11R4) says: "See Converting Bitmaps for details), yet I can't find Converting Bitmaps any where in the manual. If it makes a difference, I'm running X11R4 (fixes 1, 2) on a DECstation 3100 under Ultrix 3.1. As always, many thanks in advance. --Bruce ---------------------------------------------------- Bruce M. Cameron bmc@bru.mayo.edu Medical Sciences 1-14 (507) 284-3288 Mayo Foundation WD9CKW Rochester, MN 55905 ----------------------------------------------------