home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / x / 21461 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  2.2 KB

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