comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Changing SLICER Background Color

Changing SLICER Background Color
type: item
description: Hi Folks, I have been asked twice this week how to change the background color for the IDL-supplied routine SLICER. (It has something to do with the conjunction of the Moon and spectacular Mars, I think.) Anyway, I mentioned here a few days ago that the complete solution was more complicated than I hoped it would be. That is still true. But here is a two-minute hack that will allow anyone to change the background color of the SLICER to whatever color they like. (The background color will still change when you load a different color table, however, but you can change it back.) Here is what you do. Add this event handler module to the SLICER code. (Just in front of the SLICER module itself is a good place.) PRO SLICER_CHANGE_BACKGROUND_COLOR, event CHGCOLOR, !P.Background, Title='Change Background Color' END Find this line in the SLICER code: sl.cslide(2) = WIDGET_SLIDER(parent, xsize = sl_width, MINIMUM=0, /DRAG, $ MAXIMUM=100, UVALUE = "SHADING", Title="Differential Shading (%)", VALUE=20) Immediately *after* this line, add this line of code: dummy = WIDGET_BUTTON(parent, Value='Change Background Color', $ Event_Pro='SLICER_CHANGE_BACKGROUND_COLOR') That's it! Recompile the SLICER code and now when you choose the "Color Tables" button you will have an additional button that allows you to change the background color. You will have to download the CHGCOLOR program from my Coyote's Guide to IDL Programming web page. Be sure you get the latest version, since I have been a bug fixin'. :-) Cheers! David ---------------------------------------------------------- David Fanning, Ph.D. Fanning Software Consulting Customizable IDL Programming Courses Phone: 970-221-0438 E-Mail: davidf@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com
creator: davidf
date: 1997-05-13T07:00:00-00:00