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

Home » Public Forums » archive » Re: !P.background color question
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: !P.background color question [message #60297] Wed, 07 May 2008 11:13
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
3Rs writes:

> Ok and with this color how can I change the !P.background color ???
> I want to draw WIDGET_DRAWS with this color.
>
> Thanks for the rutine ! ;)

Widget_Control, drawWidgetID, Get_Value=wid
WSet, wid
ERASE, COLOR=FSC_COLOR('face')


Or,

TVLCT, FSC_COLOR('FACE', /TRIPLE), !P.BACKGROUND
Widget_Control, drawWidgetID, Get_Value=wid
WSet, wid
ERASE, COLOR=!P.Background


Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: !P.background color question [message #60299 is a reply to message #60297] Wed, 07 May 2008 10:36 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Ok and with this color how can I change the !P.background color ???
I want to draw WIDGET_DRAWS with this color.

Thanks for the rutine ! ;)
Re: !P.background color question [message #60300 is a reply to message #60299] Wed, 07 May 2008 10:23 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
3Rs writes:

> I want to know what is the number of the color [185,185,185] in B-W
> LINEAR palette for set this number in the system varibale !
> P.BACKGROUND.
> The idea is set the WIDGET_DRAW background color at the same color of
> the widgets default color.
>
> If this is not a good idea I accept suggestions :)

The easiest way to get this color (which is called 'Face')
is with FSC_COLOR. Here is what it is on my Windows machine:

IDL> Print, FSC_COLOR('Face', /Triple)
236
233
216

It won't have anything to do with which color table you
have loaded, as this is a system color.

You can find FSC_COLOR here:

http://www.dfanning.com/programs/fsc_color.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: !P.background color question
Next Topic: retaining ROI when rescaling?

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

Current Time: Wed Oct 08 20:01:36 PDT 2025

Total time taken to generate the page: 0.04052 seconds