Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2006
    Posts
    64

    Deleting files from a web browser?

    Hi, Im making a file manager app, but I have added a delete button, how do I make it delete the selected file(s)?

    Screenshot:

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    here is a function that will delete all the selected files in a listbox

    Code:
    -- place this function in global functions
    function DeleteFilesFromListbox(LB) 
    	sProceed = Dialog.Message( "Notice", "Are You Sure.", MB_YESNO, MB_ICONNONE, MB_DEFBUTTON1); 
    		if sProceed == IDYES then 
    		tSelected = ListBox.GetSelected(LB); 
    			if tSelected then 
    			StatusDlg.Show(); 
    			     for i,v in tSelected do 
    					strlocation = ListBox.GetItemData(LB, tSelected[1]) 
    					File.Delete(strlocation, false, false, false, nil); 
    					ListBox.DeleteItem(LB, tSelected[1]); 
    					error = Application.GetLastError(); 
    			     end 
    			StatusDlg.Hide(); 
    			if (error ~= 0) then 
    				Dialog.Message( "Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION); 
    			end     
    		end 
    	end 
    end 
    
    -- example of function call
    DeleteFilesFromListbox( "ListBox1")
    output enhanced with AMS Code Pretty
    Open your eyes to Narcissism, Don't let her destroy your life!!

  3. #3
    Join Date
    Nov 2006
    Posts
    64
    Thanks RizlaUK but it aint a listbox Im usingf, im using a web object to display files and folders.
    So for instance, when i click on the pic of the floppy disc, it displays the contents of the floppy in the white space below(Web1), I click on the pic of the CD & the Web updates to show the contents of that drive etc...


    OK, call it a Windows Explorer alternative, but wanna delete the files, cos normally in windows, i select the file & press the delete key to delete the file, hope this has made things clearer for people hehe

  4. #4
    Join Date
    May 2006
    Posts
    5,380
    ermm, ok,

    i take it you are using a web object to get a thumbnail view of the files/folders,

    im sure it can be done, but i haven't got the time tonight to mess about with it

    if no one chimes in ill see what i can come up with tomorrow
    Open your eyes to Narcissism, Don't let her destroy your life!!

  5. #5
    Join Date
    Nov 2006
    Posts
    64
    Thanks!
    And I hope that some other people can "chime in" to provide alternate ways!

    Thanks so much for your help so far!

Similar Threads

  1. Unable to find software?
    By NigelLacey in forum Visual Patch 2.0
    Replies: 4
    Last Post: 10-11-2005, 10:35 AM
  2. KB: Embedding a Web Browser Window
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 3
    Last Post: 10-21-2004, 02:37 PM
  3. HOW TO: Return a Web Browser Object to the Original URL after a Page Jump
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 02-03-2003, 09:18 AM
  4. HOWTO: Download and Install Files from the Web
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-23-2002, 01:16 PM
  5. Replies: 0
    Last Post: 10-04-2002, 10:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts