Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!ANDREW.CMU.EDU!gk5g+ From: gk5g+@ANDREW.CMU.EDU (Gary Keim) Newsgroups: comp.soft-sys.andrew Subject: Re: setting default colors Message-ID: Date: 29 Oct 90 22:11:01 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 19 Excerpts from misc: 25-Oct-90 setting default colors Dave Gross@rchland.iinus (644) > This won't work in InitializeObject because I don't have a "drawable" > yet. If I wait until InsertView or something, the default colors for > the graphic are already set. I would like these defaults to be used by > all subwindows of this view. Yes, check for the display-class in either the InsertView of FullUpdate methods. There is a single DefaultForeground and DefaultBackground color for all graphics in the process. When a view is inserted into the view-tree, it's fore- and background colors are set to the defaults. A view can then set it's own colors or just go with the defaults by taking no action. In conclusion, set the default fore- and background color when you test for the display-class. If they've already been set, that's OK. Unless your child views reset the defaults or set their own view-specific colors, your default settings will come through.