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

Home » Public Forums » archive » Re: Draw widget updates and mouse movement
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: Draw widget updates and mouse movement [message #20376] Wed, 21 June 2000 00:00
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Nils Johnson wrote:
> A program I wrote creates a WIDGET_DRAW, does a LOAD_CT, then displays an
> image using TV. However, the new color table does not take effect until
> the mouse pointer moves over the draw widget. How can I force this color
> table to take effect immediately?

I'm guessing you are logged in at the console of a UNIX box. Try this:

(1) Exit from any IDL sessions you have running.

(2) If you have a $HOME/.Xdefaults file, make sure it contains no
IDL-related entries.

(3) Paste the following lines into a file named $HOME/idl_startup.pro

;- Generic platform independent IDL startup file
if !version.os_family eq 'unix' then device, pseudo_color=8
window, /free, /pixmap, colors=-10
wdelete, !d.window
device, decomposed=0, retain=2, set_character_size=[10, 12]
device, get_visual_depth=depth
print, 'Display depth: ', depth
print, 'Color table size: ', !d.table_size

(3) Set the environment variable IDL_STARTUP to the startup file
path/name, e.g.

% setenv IDL_STARTUP $HOME/idl_startup.pro

or

$ export IDL_STARTUP=$HOME/idl_startup.pro

(4) Start a new IDL session and try the following commands:

IDL> tvscl, dist(256)
IDL> loadct, 13

If the colors in the image immediately change to a rainbow scale, then
you have successfully started IDL in 8-bit display mode (which is what
you want, I think).

If you ever decide you would like to run IDL in 24-bit mode instead,
replace 'pseudo_color=8' with 'true_color=24' in the startup file. In
24-bit mode, the image must be re-displayed for color table changes to
be visible.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: axis in scientific notation
Next Topic: Re: very fast spline interp function for heavy oversampling?

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

Current Time: Wed Oct 08 17:11:41 PDT 2025

Total time taken to generate the page: 0.00590 seconds