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

Home » Public Forums » archive » Re: Prevent color flashing
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: Prevent color flashing [message #17606 is a reply to message #17602] Mon, 01 November 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Patrick L. Nolan (pln@egret1.stanford.edu) writes:

> I'm writing my first IDL widget program. I have various editions
> of the IDL manuals and also David Fanning's book.

Forget the manuals if you want to learn widget programming. :-)

> I'm plugging
> along, learning lots of useful things. There's one annoying thing
> I haven't been able to figure out. I have a drawing window, and
> I'm using it to display simple monochrome PLOT output. This is
> running on machine with an 8-bit display, so IDL uses a private color
> table. The colors flash in the most annoying way when the cursor
> moves in and out of the IDL window. Is there some way to prevent this?

I suspect there is something going on that you may
not be aware of. There is no way that IDL should
be getting a private color map like this normally.

There are generally three reasons for this:

1. The number of IDL colors is set in an X Resource file:

Idl.colors = 245

Here IDL wants 245 colors, but there may not be this
many colors in the shared color map, so IDL obtains
a private color map.

2. The number of colors is set in an IDL startup file.

Window, Colors=256
WDelete, !D.Window

Here IDL gets a private color map because there is no
way to get a shared color map with 256 colors on an
8-bit computer running a Window system.

3. You have NetScape running when you start up IDL.

NetScape likes a LOT of colors, just like IDL. If
NetScape is running when IDL starts up, there are
no colors left in the shared color map and IDL gets
a private color map. The solution is to tell NetScape
to restrict its color consumption (I always forget how,
but it's simple).

I'd do this. Examine your .XDefaults file (as well as any
system .XDefaults file that may come into play) for anything
resembling Idl.colors and remove it. Then I would make sure
the IDL_STARTUP environment variable wasn't pointing to a
file. Then I'd quit any browser I was running.

Then, I'd start up IDL and open a window:

IDL> Window

Then send us the results of HELP, /DEVICE and let's see if
we can figure out what is going on. In the meantime,
read about the Colors keyword to the Window command to
see if setting this parameter (say to -10) will help
your situation. Remember that the number of colors in
your IDL session (and, hence, the type of color map you
get) is determined when the FIRST graphics window is
opened up. Can't do anything about it after that.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLgrPLOT and log
Next Topic: Re: plot (x,y,z) triplets as a surface?

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

Current Time: Sun Oct 12 15:04:49 PDT 2025

Total time taken to generate the page: 0.32276 seconds