[Gambas-user] File dialog question ?can one multi-select

werner 007 admin at ...1080...
Mon Aug 10 22:12:38 CEST 2009


Maybe i can help you with a example how i use it in a Project.
I use TRY because the user can toggle between Multi- and Single- select

    TRY fcRoot = File.Dir(fcDialog.SelectedPaths[0])
   IF error = 0 then
    FOR i = 0 TO fcDialog.SelectedPaths.Count - 1
   ' loop trough filelist
      doSomethingWith( fcDialog.SelectedPaths[I] )
    NEXT 
  ELSE 
    TRY fcRoot = File.Dir(fcDialog.SelectedPath)
   ' use single selection
    doSomethingWith( fcDialog.SelectedPath )
  END IF
 
Regards, Wene007




richard terry-5 wrote:
> 
> I want to popup a file dialog and multi-select files and return these say
> in a 
> collection, but can't see any way to do this.
> 
> My code looks like this at present, and allows 1 file:
>  
> Dialog.Title = "Select Image File"
> Dialog.Filter = ["*.png", "Image Files", "*", "All files"]
>   
> If Dialog.OpenFile() Then Return
> 
> do something with the file......
> 
> Thanks in anticipation.
> 
> Richard
> 
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day 
> trial. Simplify your report design, integration and deployment - and focus
> on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 
View this message in context: http://www.nabble.com/File-dialog-question--can-one-multi-select-tp24897686p24906701.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list