Path: utzoo!attcan!uunet!cs.utexas.edu!usc!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: Text Background Message-ID: <8907051736.AA20005@expo.lcs.mit.edu> Date: 5 Jul 89 17:36:15 GMT References: <164@cerc.wvu.wvnet.edu.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 30 > After the XtRealizeWidget invocation, We are trying to set the > text widget background using : > XtSetArg(arg[0], XtNbackground, 1); > XtSetValues(widget_id, arg, 1); > It does not seem to work. What does setting the background pixel to 1 mean? Are you sure that it is not currently set to 1, and that 1 corresponds to a valid pixel? I have used code like the following and it seems to work for me. #include XtSetArg(args[0], XtNBackground, WhitePixelOfScreen(XtScreen(w))); XtSetValues(w, args, ONE); or XtSetArg(args[0], XtNBackground, BlackPixelOfScreen(XtScreen(w))); XtSetValues(w, args, ONE); Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213