New topic: 

Listbox, File Name Help Needed

<http://forums.realsoftware.com/viewtopic.php?t=45857>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        jerryab          Post subject: Listbox, File Name Help 
NeededPosted: Fri Nov 09, 2012 12:16 am                         
Joined: Mon Dec 12, 2011 7:25 pm
Posts: 104
Location: Grand Rapids MI Area                I have been searching for a way 
to go about doing the following.

I would like to have a user select one or more file names from a dialog box
and add them to a listbox. These files would be picture files. It would be
nice if I could also show a thumb nail of each file added to the listbox.

I'm assuming folder item dialog but not sure how to determin what file/s were
chosen by the user and how to add them to the listbox

I need to add the full file path to the listbox so I can add the file path
to a database. Later the pictures will be shown in a slide show from the
path names retrieved from the database.

I just not sure how to do the single or multiple selection and add them
to a list box and show a thumb nail.

This needs to work on windows and mac.

Can anyone lead me in the right direction ?      
_________________
iMac 27" (2.8GHz Intel Core i5, 16GB RAM, 1TB Drive) OS X Lion 10.7.3 and 
Windows 7
Toshiba Laptop Running Windows 7 & WinXP SP3
REAL Studio Enterprise Edition 2012r1
http://www.theultimatecampgroundlog.com
Being rewritten for the Mac  
                             Top                Bimal          Post subject: 
Re: Listbox, File Name Help NeededPosted: Fri Nov 09, 2012 12:58 am             
            
Joined: Mon Jan 16, 2012 8:08 am
Posts: 141
Location: India                jerryab wrote:I'm assuming folder item dialog 
but not sure how to determin what file/s were
chosen by the user and how to add them to the listbox


For determine what types file chosen by the user:
If u only want to select the image file like .jpg, .png etc then u have to add 
a File types in your project and in that file types u have to add the extension 
like .jpg, .png etc in the extensions  column of the file type.

how to add them to the listbox

if U want the show the  complete path of the file Like (C:\users\ myphoto.jpg) 
Then u can proceed like this

  DIm f as FolderItem

F = GetOpenFolderItem("")  //  Write File type Display name inside the bracket

if F.Exists and F <> Nil Then
  
  Listbox1.AddRow F.AbsolutePath
  
End if


U can do like this . If u have any problem let me inform .   
                             Top                charonn0          Post subject: 
Re: Listbox, File Name Help NeededPosted: Fri Nov 09, 2012 12:59 am             
                    
Joined: Mon Apr 02, 2007 2:08 am
Posts: 981
Location: San Francisco, CA, USA                Once you have a FolderItem for 
a picture file, you can use Picture.Open to create an RB Picture object from 
the file. Each row in the listbox can have an icon, which is a Picture object. 
I think you see where I'm going here.     
_________________
Boredom Software  
                             Top                amitavak          Post subject: 
Re: Listbox, File Name Help NeededPosted: Fri Nov 09, 2012 2:49 am              
                   
Joined: Mon Jan 02, 2012 1:51 am
Posts: 353
Location: India                Or You can draw the picture in the 
"CellBackgroundPaint" event then you have full control over your drawing.      
_________________
Amitava Karan
Real Studio 2012 Release 1
Windows 7 (32 bit)
Mac OS X Version 10.7  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to