Submitted by Anonymous on Wed, 11/01/2000 - 17:13. Developers
I need to create a FileSelectionDialogBox which allows enable user to select multiple files.
Does anyone have any ideas or references about this?
Thanks.
Fri, 06/29/2012 - 13:35
#1
Multiple FilesSelectionDialogBox
I looked at the XmFileSelectionBoxCallbackStruct and it didn`t look like there was room for multiple file names to be returned. Maybe you could add a button so that you have a select button to keep getting filenames and extend the dialog to show the list. At motif zone I saw how to extend the dialog.
Thanks Zoe.
Can you be more specific on where did you find the info about "how to extend the dialog"?
Its under http//www.motifzone.com/tmd/articles/Durt_Huhner/nov95.htm
Its called How`d you do htat? X/Motif Tips & Tricks Customizing Motif Dialogs.
I did this by setting the XmEXTENDED_SELECT to rigth most list in the file selector. Use the XmFileSelectionBoxGetChild function to get the wList (XmDIALOG_LIST)
This list ( already parsed from the XmDIALOG_FILTER_TEXT extension used ) is then made multi-select.
You can then use a XtVaGetValues in the selection callback to get the XmNselectedItemCount and XmNselectedItems resources from the list.
I did this by setting the XmEXTENDED_SELECT to rigth most list in the file selector. Use the XmFileSelectionBoxGetChild function to get the wList (XmDIALOG_LIST)
This list ( already parsed from the XmDIALOG_FILTER_TEXT extension used ) is then made multi-select.
You can then use a XtVaGetValues in the selection callback to get the XmNselectedItemCount and XmNselectedItems resources from the list.