comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: window colour maps
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: window colour maps [message #9934] Tue, 23 September 1997 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Peter Gallagher wrote:
>
> Does anyone know how to select a separate colour map for several
> windows? I am currently working with 2 windows; I want one window
> with a black and white colour map and the other with a red temp.
> colour table.
>
> Any suggestions?
>

If you need both windows viewed simultaneously with their own
colormaps, and you don't mind using half the available colors
for each, then Liam's solution is the way to go.

If you want to assign each window it's own complete colormap,
and have that colormap restored when the cursor moves into the
window, you can use the KBRD_FOCUS_EVENTS keyword when you
create your draw widgets. You'll have to have a unique EVENT_PRO
for the events from each of your draw widgets. Then in these
event processing procedures put something like:

PRO draw1_event, event

name = strmid(tag_names(event, /structure_name), 7, 1000)

case (name) of

"KBRD_FOCUS": begin

; Entering program area so load colors
if ( event.enter eq 1) then $
loadct, 0, /silent

end
...

END

You should check out David Fanning's XWINDOWS routine, as it is
a good example of this technique, though he does it slightly
differently. I believe his web page has a tutorial on this as well:

http://www.dfanning.com

Hope this helps.

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Previous Topic: Q: Clear everything in IDL?
Next Topic: Re: _EXTRA keywords not noticed

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:07:22 PDT 2025

Total time taken to generate the page: 0.00454 seconds