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

Home » Public Forums » archive » Re: objets solarsoft
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: objets solarsoft [message #43113 is a reply to message #43103] Tue, 15 March 2005 11:17 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
hernan writes:

> =BFcomo puedo insertar esta linea (ver
> http://orpheus.nascom.nasa.gov/~zarro/idl/objects/objects.ht ml) dentro
> de un widget?.
>
> IDL> file=3D'mdi_maglc_re_20040310_2102.fts'
> IDL> mobj=3Dobj_new('mdi') ;-- create an MDI
> object
> IDL> mobj->read,file ;-- read MDI file
> IDL> mobj->plot ;-- plot MDI image
>
> Gracias

Something like this:

Pro Example_Event, event

; Is this a selection event?
IF event.select NE 1 THEN RETURN

; Get the name of a FITS file to open.
filename = Dialog_Pickfile('mdi_maglc_re_20040310_2102.fts', $
Filter='.fits')
IF filename EQ "" THEN RETURN


; Get the info structure.
Widget_Control, event.top, Get_UValue=info

; Read the file.
info.mobj -> Read, filename

; Display the plot in draw widget.
Widget_Control, info.draw, Get_Value=wid
WSet, wid
info.mobj -> Plot

END


Pro Example_Cleanup, tlb

Widget_Control, tlb, Get_UValue=info
Obj_Destroy, info.mobj

END

Pro Example

tlb = Widget_Base(/Column)
button = Widget_Button(tlb, Value='Select File to Plot')
draw = Widget_Draw(tlb, XSize=400, YSize=400)

info = {draw:draw, mobj:Obj_New('mdi')}
Widget_Control, tlb, /Realize, Set_UValue=info

Xmanager, 'example', tlb, /No_Block, $
Event_Hander='Example_Event', $
Cleanup='Example_Cleanup'
END

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: creating documentation file
Next Topic: reflection function

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

Current Time: Tue Dec 02 11:30:35 PST 2025

Total time taken to generate the page: 0.01847 seconds