Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwjcc!abvax!jaz From: jaz@abvax.UUCP (Jack A. Zucker) Newsgroups: comp.windows.x Subject: text color in asciiTextWidget Message-ID: <1042@abvax.UUCP> Date: 8 Mar 90 02:49:59 GMT Organization: Allen-Bradley Company, Inc; Industrial Computer Division, Highland Heights, OH Lines: 46 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