Re: Widget color tables [message #14646 is a reply to message #14643] |
Tue, 16 March 1999 00:00   |
throop
Messages: 8 Registered: August 1998
|
Junior Member |
|
|
In article <36ED957B.2D06B714@ssec.wisc.edu>,
Liam Gumley <Liam.Gumley@ssec.wisc.edu> wrote:
> throop@colorado.edu wrote:
>> I'm having problems setting the color table properly in a widget
>> program. IDL 5.2, sparc ultra, 8-bit display. Here's the situation:
>> o The problem is that the loadct command appears to be completely
>> ignored; the color table is just not set, or at least not displayed.
>> Instead, my default desktop color table is used. help, /device tells
>> me that indeed a 100-element private color map is assigned.
>> o I've found that if, before or after the widget is realized,
>> I create a non-widget window:
>> and move the cursor _into that window_, the color table for the widget
>> will be properly displayed and updated, as long as the cursor's in
>> that window. It appears that idl may be setting the color table
>> properly, but only displaying it when the cursor is in a draw window,
>> and not when the cursor's in a widget window.
>
> The following IDL startup file should be an effective cure for this
> problem:
>
> ;---cut here---
> ;- Set up 8 bit display and grab colors
>
> if !version.os_family eq 'unix' then device, pseudo = 8
> device, retain = 2, decomposed = 0
> window, /free, /pixmap, colors = -5
> plot, [ 0 ]
> wdelete, !d.window
> print, 'Number of colors is ', !d.n_colors
Thanks -- but it doesn't work; I get the same behavior.
In both cases, IDL really _does_ seem to be allocating the
color table -- it's just not swapping it in at the proper time.
-Henry
------------------------------------------------------
| Henry Throop throop@colorado.edu (303) 492-1628 |
------------------------------------------------------
| Laboratory for Atmospheric and Space Physics |
| University of Colorado, Boulder 80309-0392 |
------------------------------------------------------
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
|
|
|