mago@delphi.it (Giovanni Beani) (09/28/90)
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