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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Prevent color flashing [message #17578] Tue, 02 November 1999 00:00
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
pln@egret1.stanford.edu (Patrick L. Nolan) writes:

> David Fanning (davidf@dfanning.com) wrote:
> :
> : 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).
> :
> This was the problem. When I shut Netscape off, I was able to share
> the colormap. I have started netscape with the option -ncols 128, which
> makes it much less obnoxious.

> Thanks.

You might try "netscape -install" which tells Netscape to use a private color
map. This allows IDL to use a lot more colors. The side effect is that
when Netscape is selected, then all the other programs end up with weird
colors.

William Thompson
Re: Prevent color flashing [message #17586 is a reply to message #17578] Tue, 02 November 1999 00:00 Go to previous message
pln is currently offline  pln
Messages: 10
Registered: September 1991
Junior Member
David Fanning (davidf@dfanning.com) wrote:
:
: 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).
:
This was the problem. When I shut Netscape off, I was able to share
the colormap. I have started netscape with the option -ncols 128, which
makes it much less obnoxious.

Thanks.
Re: Prevent color flashing [message #17590 is a reply to message #17578] Tue, 02 November 1999 00:00 Go to previous message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
> Pray, what do tracking events and color map flashing have in common?

I guess I was thinking of my own code when I suggested that. I have
widget_draw update function at the end of event handler, so if I had a
squillion of events generated by either /draw or /tracking, I might have all
kinds of flashing :-) In my case, I can afford updating the widget_draw after
every event because there are not too much of them.

Sorry for confusion,
Pavel
Re: Prevent color flashing [message #17602 is a reply to message #17578] Mon, 01 November 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:

> Pray, what do tracking events and color map flashing have in common?

Nothing, as far as I know. :-(

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
Re: Prevent color flashing [message #17603 is a reply to message #17602] Mon, 01 November 1999 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Pavel Romashkin <promashkin@cmdl.noaa.gov> writes:
>
> "Patrick L. Nolan" wrote:
>
>> The colors flash in the most annoying way when the cursor
>> moves in and out of the IDL window.
>
> Does not this indicate that either tracking events or widget_draw mouse
> movement events accidentally got turned on?

This is interesting, since I have exactly the opposite problem from
Patrick. My XFWINDOW procedure, when started on a color-starved 8-bit
display, *doesn't* flash the colors. The window does have a draw
widget and enables tracking events.

The end result is that the widget gets stuck with the same ridiculous
color table no matter where I have the mouse cursor. [ Of course if I
have enough colors to begin with everything is fine. ]

Pray, what do tracking events and color map flashing have in common?

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: Prevent color flashing [message #17604 is a reply to message #17602] Mon, 01 November 1999 00:00 Go to previous message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
"Patrick L. Nolan" wrote:

> The colors flash in the most annoying way when the cursor
> moves in and out of the IDL window.

Does not this indicate that either tracking events or widget_draw mouse
movement events accidentally got turned on?

Cheers,
Pavel
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
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 14:53:39 PDT 2025

Total time taken to generate the page: 0.00444 seconds