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

Home » Public Forums » archive » Re: background color for draw widget
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: background color for draw widget [message #60738 is a reply to message #60736] Fri, 06 June 2008 08:51 Go to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On Jun 6, 10:16 am, cgoet...@igpp.ucla.edu wrote:
> Hi All, When I create a simple draw widget, the background color
> defaults to black. How do I change that to a light grey? Thanks for
> your help! Cindy

Hi,

The simplest way is to call ERASE since the draw widget contains a
regular old window. For example, if you are using direct graphics
you might do the following....

WIDGET_CONTROL, myDrawID, GET_VALUE = winID
WSET, winID
ERASE, somecolor

Depending upon how you set up backing store, you might need to refresh
this as the window gets covered/uncovered. Sometimes it is best to
let the system or IDL do that for you. BUT you have to be thoughtful
about this method as it won't work if you intend to ever use your
plotting code on a device other than a window (for example, ERASE
starts a new page or something like that on the PRINTER device.] If
you want it to be device independent you might use...

POLYFILL, [-0.01, -0.01, 1.1, 1.1, -0.01], [-0.01, 1.1, 1.1, -0.01,
-0.01], /NORM, COLOR = somecolor

which will draw a box of "somecolor" value over then entire window
(plus enough to lap over the edges).

Cheers,
Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: GUI in IDL 7
Next Topic: Array indexing: what is IDL doing?

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

Current Time: Sun Oct 12 07:21:35 PDT 2025

Total time taken to generate the page: 1.36027 seconds