home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!lsl!snail
- From: snail@lsl.co.uk
- Newsgroups: comp.windows.x
- Subject: Re: Changing the background of a pixmap
- Message-ID: <1993Jan22.105251.2957@lsl.co.uk>
- Date: 22 Jan 93 10:52:51 GMT
- References: <ALSAGGAF.93Jan13171926@e40-008-4.mit.edu> <1993Jan19.201957.21870@pilot.dmg.ml.com>
- Organization: Laser-Scan Ltd., Cambridge
- Lines: 40
-
- In article <1993Jan19.201957.21870@pilot.dmg.ml.com>, persico@orestes.sysdev.dmg.ml.com (Matthew Persico) writes:
- > In article <ALSAGGAF.93Jan13171926@e40-008-4.mit.edu>,
- > ed.duomo@launchpad.unc.edu writes:|>
- > |> [detailed explanation removed...]
- > |>
- > |> So there you have it, gentile Xperts: is there a way of changing the
- > |>background of a pixmap after it has been created?
- > |>
- > |> Thanks.
- > |>
- > |> -Ed.
- > |>
- > I'd like to ask a related question: I have wrapped Motif message dialogs
- > in a set of "convenience functions" that allow me to reuse these widgets
- > instead of creating and destroying them. I have discovered that
- > if I try to change the background color of dialog after creation, the
- > background color of the symbol doesn't change. Here's a sample:
-
- [deleted..]
-
- > If I do this, then the foregound and background come up with
- > the correct colors, but the pixmap background and foregound don't
- > match the dialog's values. I guess there is some other value I need to
- > set, but I can;t find it in O'Reilly Volume 6 or the OSF liturature.
- > Any answers out there?
-
- The reason is simple, as der Mouse has pointed out in previous posts.
- The symbol is a pixmap. The pixmap has pixel values coded into it when it is
- created. If you select your colours before the dialog is created (when the
- pixmap is also created [for simplification in this example]) then the pixmap
- will be initialised with the correct colours. If you then change the colours
- later the pixmap will already have the previous pixel values encoded in it.
- Result: it doesn't look the same.
- --
- snail@lsl.co.uk
-
- "Washing one's hands of the conflict between the powerful and the powerless
- means to side with the powerful, not to be Neutral."
- Quote by Freire.
- Poster by OXFAM.
-