Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!delphi.it!mago From: mago@delphi.it (Giovanni Beani) Newsgroups: comp.windows.x Subject: UIL & Pixmap Colors Message-ID: <9009281602.AA21791@delphi.uucp> Date: 28 Sep 90 16:02:38 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 45 I written an application which uses the Motif 1.0.A library Version & its UIL. The problem is: - I have a XmToggleButton widget defined in the UIL file as object square: XmToggleButton widget { arguments { XmNborderWidth = 1; XmNmarginWidth = 3; XmNmarginHeight = 3; XmNindicatorType = XmN_OF_MANY; XmNindicatorOn = false; XmNlabelType = XmPIXMAP; XmNlabelPixmap = square_icon; XmNselectPixmap = square_select_icon; XmNforeground = color("red"); XmNbackground = color("green"); }; callbacks { XmNvalueChangedCallback = procedure toggle_proc (k_square); MrmNcreateCallback = procedure create_proc (k_square); }; }; Where the XmNlabelPixmap and the XmNselectPixmap are two Pixmap defined in the same UIL file as icons, with a specific color_table. Then I want change the background and the foreground of these Pixmaps at runtime using X functions as Arg arg[1]; XtSetArg(arg[0], XmNforeground, my_color); XtSetValues(square_widget, arg, 1); The "square_widget" ID is correct, the "my_color" is an index from 0 to 15 of a correct colormap allocated. But.... nothing happens, why ?!? Giovanni Thanks in advance to anyone who might an answer. ----- EMail: gbeani@delphi.i2unix.uucp