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 #60736 is a reply to message #60735] Fri, 06 June 2008 09:11 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
ben.bighair wrote:
> 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).

Can't you just set !P.BACKGROUND to some other colour?

cheers,

paulv
[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 12:18:41 PDT 2025

Total time taken to generate the page: 0.48200 seconds