Article View: comp.windows.x
Article #37845text color in asciiTextWidget
From: Jack A. Zucker
Date: Thu, 08 Mar 1990 02:49
Date: Thu, 08 Mar 1990 02:49
46 lines
1667 bytes
1667 bytes
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
Technical Details
Message-ID:
<1042@abvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwjcc!abvax!jazShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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