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

Home » Public Forums » archive » Re: how do I delete ENVI windows from a procedure?
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: how do I delete ENVI windows from a procedure? [message #38530] Wed, 17 March 2004 05:08
timothy.williams is currently offline  timothy.williams
Messages: 20
Registered: October 2001
Junior Member
"Peter Mason" <drone@spam.com> wrote in message news:<8QJ5c.506$IH5.26431@news.optus.net.au>...

> ENVI_FILE_MNG, some_fid, /REMOVE, /NO_WARNING
> Along with taking "some_fid" out of the available bands list, this will
> close any ENVI image displays where it is involved - without asking for
> anyone's permission. Last I checked, the NO_WARN keyword was undocumented.
> It has been around for quite some time, though.
>
> If you want to close some displays but keep things around in the available
> bands list then you should experiment with the undocumented ENVI procedure:
> DISPLAY_MNG, display_number, /REMOVE
> One thing about this call: "display_number" appears to be a zero-based
> display index, while what you see in the display's title bar is a 1-based
> index.
> (I don't think that you should be messing with the draw widgets themselves.)
>
>
> HTH
> Peter Mason
> PS: HELP, /ROUTINES in a fresh ENVI session can be interesting sometimes,
> especially in older versions of ENVI where IDL's COMPILE_OPT HIDDEN didn't
> exist yet :-)

Thanks. I'll try this. It sounds like it's exactly what I was looking for.

Why does it seem that the most useful things are undocumented?
Re: how do I delete ENVI windows from a procedure? [message #38545 is a reply to message #38530] Tue, 16 March 2004 12:54 Go to previous message
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
Tim Williams wrote:
> I have a ENVI/IDL procedure that performs various steps in some
> processing. One of the steps is to do a couple of envi_display_bands
> calls to display a couple of images. After the user is done with
> enhancing the image displays, I have the user click a button to
> continue on with more processing. This extra processing calls a second
> IDL procedure that puts up more windows (not ENVI displays).
>
> When the second IDL procedure is done, I do a wdelete on each of the
> windows it created, since I have the window ids. I'd like to be able
> to remove the ENVI images and their associated displays. I can get the
> display numbers, window ids and the opened file ids with
> envi_get_display_numbers(), envi_disp_query, and do a wdelete on the
> window ids, and a envi_file_mng on the file ids, but I want to avoid
> the popup window about deleting the display when I remove each ENVI
> file.
>
> What I want to do is the same thing as a 'File->Close All Files' in
> the Available Files List widget from my procedure.
>
> Is there a way to do this?


ENVI_FILE_MNG, some_fid, /REMOVE, /NO_WARNING
Along with taking "some_fid" out of the available bands list, this will
close any ENVI image displays where it is involved - without asking for
anyone's permission. Last I checked, the NO_WARN keyword was undocumented.
It has been around for quite some time, though.

If you want to close some displays but keep things around in the available
bands list then you should experiment with the undocumented ENVI procedure:
DISPLAY_MNG, display_number, /REMOVE
One thing about this call: "display_number" appears to be a zero-based
display index, while what you see in the display's title bar is a 1-based
index.
(I don't think that you should be messing with the draw widgets themselves.)


HTH
Peter Mason
PS: HELP, /ROUTINES in a fresh ENVI session can be interesting sometimes,
especially in older versions of ENVI where IDL's COMPILE_OPT HIDDEN didn't
exist yet :-)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Announcing GDL 0.7, now with PLOT command
Next Topic: ENVI: How to remove vector layer from the list of available vectors programmatically?

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

Current Time: Wed Oct 08 13:04:55 PDT 2025

Total time taken to generate the page: 0.00657 seconds