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 #43103 is a reply to message #43102] Wed, 16 March 2005 05:47 Go to previous messageGo to previous message
hernan is currently offline  hernan
Messages: 11
Registered: March 2005
Junior Member
David Fanning wrote:
> 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/

Hello David
Thank you very much for your help. In my PC, this message have
appeared:

% Keyword EVENT_HANDER not allowed in call to: XMANAGER
% Execution halted at: EXAMPLE 50
C:\RSI\IDL60\hernan\example.pro
% $MAIN$

but deleting this line, the program works correctly. Do you know if
this happen because I am using version 6.0?. Or there may be another
reason?
[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: Sat Oct 11 15:12:34 PDT 2025

Total time taken to generate the page: 1.04214 seconds