home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x.motif
- Path: sparky!uunet!think.com!paperboy.osf.org!paperboy!drand
- From: drand@spinner.osf.org (Douglas S. Rand)
- Subject: Re: getting widgets to re-read resource database
- In-Reply-To: lmpieni@afterlife.ncsc.mil's message of 11 Jan 93 14:31:18 GMT
- Message-ID: <DRAND.93Jan11125347@spinner.osf.org>
- Sender: news@osf.org (USENET News System)
- Organization: Open Software Foundation
- References: <1993Jan11.143118.10475@afterlife.ncsc.mil>
- Date: 11 Jan 93 12:53:47
- Lines: 38
-
- In article <1993Jan11.143118.10475@afterlife.ncsc.mil> lmpieni@afterlife.ncsc.mil (Lori M. Pieniazek) writes:
-
- ...
- The problem is that I do not know how to make the widgets re-read their
- resources from the resouce database that has been just changed, thus,
- changing their background color. I have tried to unmanage/manage but
- that does not seem to work.
-
- If there is a better way or different way of achieving the same results please
- let me know. I am looking for a way to change all of the widgets after they
- have been created and managed without having to specifically set the value
- of the background individually for all the widgets.
-
- You cannot without your own code to do it. Resources are read from
- within the Intrinsics code which creates the widget. Both constraint
- and instance resources are obtained at this time. Of additional
- concern are resources which are only valid at creation time (for
- instances) or constraint initialize time (for constraint manager).
-
- If the resource database is changed, and providing that you
- can find out about it, you can walk the database for each
- widget and each resource which you feel is significant so
- that you can update it. Not easy, but possible, and this
- would allow you to segregate the changes that should be recognized
- from those that should not.
-
- You might take a look at EditRes, it provides some of this
- as part of its functionality. Another place to see how the
- resource database is used is the Wcl code, which contains
- some nice examples of grabbing non-widget resources from the
- database.
-
-
- --
- Douglas S. Rand <drand@osf.org> OSF/Motif Dev.
- Snail: 11 Cambridge Center, Cambridge, MA 02142
- Disclaimer: I don't know if OSF agrees with me... let's vote on it.
- Amateur Radio: KC1KJ
-