problem with the widget filesel [message #45005] |
Tue, 09 August 2005 06:18  |
rlayberry
Messages: 33 Registered: November 2004
|
Member |
|
|
Hi Please help...
I am using the widget filesel in order to select files to open. the
example in the help only allows you to pick a single file. i want to
pick multiple files. when i click on multiple files, however, the
event handler only picks the first which is selected...how do I return
all those files which are selected in the event handler?
thanks in advance
russ
|
|
|
Re: problem with the widget filesel [message #45135 is a reply to message #45005] |
Wed, 10 August 2005 12:38  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
rlayberry@hotmail.com writes:
> I am using the widget filesel in order to select files to open. the
> example in the help only allows you to pick a single file. i want to
> pick multiple files. when i click on multiple files, however, the
> event handler only picks the first which is selected...how do I return
> all those files which are selected in the event handler?
As pointed out in the on-line help, the event structure
only contains the first of the multiple selected files in
the VALUE field. If you want *all* of the selected files, you
have to use the GET_VALUE keyword to get them:
Widget_Control, event.id, Get_Value=allSelectedFiles
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: problem with the widget filesel [message #45141 is a reply to message #45005] |
Tue, 09 August 2005 23:48  |
vijay.kannoju
Messages: 3 Registered: August 2005
|
Junior Member |
|
|
Hi Russ,
If u r problem is only select multiple files, then use
DIALOG_PICKFILE function with MULTIPLE_FILES keyword set to 1 (
/MULTIPLE_FILES ), then it allows u to select multiple files and
returns an array of string, which is a string array of all file
names.Then u can pass this variable to event procedures.
Cheers,
Vijay.K
|
|
|