Widget color tables [message #14650] |
Mon, 15 March 1999 00:00  |
throop
Messages: 8 Registered: August 1998
|
Junior Member |
|
|
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 I have a widget program with a draw window, which is started up
by code that is similar to this:
base = widget_base()
draw_id = widget_draw(base, colors=100)
widget_control, /realize, base
widget_control, get_value = win, draw_id
wset, win
loadct,3
tvscl, dist(100)
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:
window, 0
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.
So, is this regular behavior? Any way to get IDL to switch in the
right color table when the pointer's in the widget window? Thanks for
any help.
-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
|
|
|
Re: Widget color tables [message #14722 is a reply to message #14650] |
Thu, 18 March 1999 00:00  |
somebody
Messages: 1 Registered: March 1999
|
Junior Member |
|
|
Hello !
We have the same problem with the widget colors, and there seems to be
no cure
to it. Every known method to get the colors fails. Anyway, I observed an
interesting
effect: When crossing the border of the widget window, idl switches
shortly to the
private colormap, but then immediately switches back. It seems that
there is a bug
in identifying the window which receives the private map.
--
Dr. Udo Grabowski email: udo.grabowski@imk.fzk.de
Institut f. Meteorologie und Klimaforschung II, Forschungszentrum Karslruhe
Postfach 3640, D-76021 Karlsruhe, Germany Tel: (+49) 7247 82-6026
http://www-imk.fzk.de:8080/imk2/ame/grabowski/ Fax: " -6141
|
|
|