Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!cbnewsh!wolf From: wolf@cbnewsh.att.com (thomas.wolf) Newsgroups: comp.windows.x Subject: Need help with D.Young's example? Message-ID: <1990Aug21.235152.8328@cbnewsh.att.com> Date: 21 Aug 90 23:51:52 GMT Distribution: usa Organization: AT&T Bell Laboratories Lines: 27 I'm in the process of learning to write my own widgets and have found Douglas Young's book extremely helpful. I am curious, however, as to the following: In Chapter 12's example of the simple "Dial" widget, some defaults are set in Dial.c (foreground, indicatorColor, etc.) in the resources[] array. I found that modifying these defaults and recompiling resulted in the expected changes at run-time, _except_ when I changed the defauts for XtNforeground. No matter what color I specified, the program would always set the foreground color to "Black" (ie. the little line segments in his dial widget would always be black.) If, on the other hand, I specify the foreground color at run-time (with the command-line option '-fg') it is correctly displayed by the program. Why is this so? I have the feeling I'm missing a basic point. I have the same problem with widgets I've begun to write. Any help would really be appreciated, Tom -- +-------------------------------------+ "Stupid" questions are better than | Thomas Wolf | (201) 949-8063 | no questions at all. No answer is | Bell Labs, NJ | wolf@spanky.att.com | better than a stupid one. +-------------------------------------+