jaz@abvax.UUCP (Jack A. Zucker) (03/08/90)
After further reading on the subject, I realized I had to change the
color in the textSink widget as well as the asciiTextWidget. I tried the
following code but it still does not work:
void
de_enter_leave(Widget widget, int timeslot, XEvent *event)
{
Display *display;
Window window;
Arg args[3];
XColor colors[2];
Pixel temp;
Widget text_sink;
/**
** Get foreground, background, and textSink widget
**/
XtSetArg(args[0], XtNbackground, &(colors[1].pixel));
XtSetArg(args[1], XtNforeground, &(colors[0].pixel));
XtSetArg(args[2], XtNtextSink,&text_sink);
XtGetValues(day_entry[(int) timeslot],args, THREE);
temp = colors[1].pixel; /* Swap foreground and background of asciiText*/
colors[1].pixel = colors[0].pixel;
colors[0].pixel = temp;
/**
** Set foreground , background of text widget
**/
XtSetArg(args[0],XtNbackground,colors[1].pixel);
XtSetArg(args[1],XtNforeground,colors[0].pixel);
XtSetValues(day_entry[(int) timeslot],args,TWO);
/**
** Set foreground, background of textSink
**/
XtSetArg(args[0],XtNbackground,colors[1].pixel);
XtSetArg(args[1],XtNforeground,colors[0].pixel);
XtSetValues(text_sink,args,TWO);
}
HELP!!!!!
jaz@calvin.icd.ab.com