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

Home » Public Forums » archive » Re: dialog_pickfile return question..
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: dialog_pickfile return question.. [message #54314] Wed, 06 June 2007 09:51 Go to previous message
ryanselk is currently offline  ryanselk
Messages: 16
Registered: May 2007
Junior Member
On Jun 6, 10:13 am, jkj <k...@vexona.com> wrote:
> On Jun 6, 10:44 am, ryans...@gmail.com wrote:
>
>
>
>> How would I go about getting the path choosen from Dialog Pickfile and
>> then having that path appear in a pre-existing widget_text? I have
>> attempted using a pointer but I could not get it to work, as the
>> widget_text doesn't 'update'.
>
>> Here is my code, if anyone could help it would be fantastic!
>
>> PRO test_event, ev
>> widget_control, ev.id, get_value=value
>> widget_control, ev.top, get_uvalue=info
>
>> if value eq '...' then begin
>> filepicked = DIALOG_PICKFILE (/READ)
>> print, "File picked"
>> print, filepicked
>> fp = ptr_new(filepicked)
>> END
>
>> END
>
>> PRO test, value
>
>> main = widget_base (title='PRO', MBAR=bar, /row)
>> wt0 = WIDGET_TEXT(main, XSIZE=15, uvalue='Filename', /ALL_EVENTS, /
>> EDITABLE)
>
>> findfiles = widget_button (main, value='...')
>
>> widget_control, main, /realize
>> widget_control, main, set_uvalue=info
>> xmanager, 'experiment', main
>
>> END
>
>> Thanks,
>> Ryan
>
> Sent the id of widget_text to the handler in the info structure and
> then update it from within the event handler:
>
> 1. Add wt0 to the info structure:
> info = { $
> id:wt0 $
> }
>
> ....
> 2. use wt0 in the event handler:
> filepicked = DIALOG_PICKFILE (/READ)
> widget_control, info.id, set_value=filepicked
>
> -Kevin



Thank you to the both of you!
I got it working great now.

I know my code there has some problems, that was just a small part of
a bigger program
I used to make showing you guys easier.

Thanks again!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: scaling idlGrAxis ticks?
Next Topic: How to use backing store while using object graphics?

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

Current Time: Wed Oct 08 17:15:01 PDT 2025

Total time taken to generate the page: 0.00461 seconds