Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2006
    Posts
    7

    Grin load a picture from list box

    Hi...
    I create a listbox that search a folder for *.jpg.I want to open picture in my project when i chose one from list box.

    --This is my codes

    LB = "ListBox1";
    tSelected = ListBox.GetSelected(LB);
    if tSelected then

    sFolderToOpen = ListBox.GetItemData(LB, tSelected[1]);
    tFiles = File.Find(sFolderToOpen, "1.JPG", false, false, nil);
    -- I dont khnow what i my must put in ?
    Image.Load("Image1", ? );


    Please help me

  2. #2
    Join Date
    Oct 2005
    Posts
    24
    I found this exempel in AMS 6.0 Help


    --Disable listbox Updating
    ListBox.SetUpdate("ListBox1", false);

    --Get the desired folder to browse
    folder = Dialog.FolderBrowse("Open Folder", "C:\\");

    --populate tables with all the .jpg and .png files
    file_jpg = File.Find(folder, "*.jpg", false, false, nil);
    file_png = File.Find(folder, "*.png", false, false, nil);

    images = {file_jpg, file_png};

    --do the following for each file:
    for k in images do --loops through the different image types
    for j,file_path in images[k] do --loops through each image file
    --add the item to the listbox, with the name visible and path as data
    ListBox.AddItem("ListBox1", String.SplitPath(file_path).Filename, file_path);
    end
    end

    --Allow the listbox to display the updated content
    ListBox.SetUpdate("ListBox1", true);



    Insert the following code into the On Select event for ListBox1 :

    selected = ListBox.GetSelected("ListBox1");
    for j,k in selected do
    Image.Load("Image1", ListBox.GetItemData("ListBox1", k));
    end

  3. #3
    Join Date
    Apr 2006
    Posts
    7
    Thanks but it doesnt work

  4. #4
    Join Date
    Apr 2006
    Posts
    32
    i have a simple
    Attached Files

  5. #5
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Quote Originally Posted by rooholah
    Thanks but it doesnt work
    Hi Rooholah,

    Try this one at : http://www.indigorose.com/forums/sho...7&postcount=87
    Newbie Examples
    ------> AMS 7.5 : amstudio.azman.info
    ----> AMS 6 & 5: www.azman.info/ams/
    ----> FB: facebook.com/GuideToWealth

    ----> Content Development Blog: www.AZMAN.asia

Similar Threads

  1. List Box problem
    By TonyTJ in forum AutoPlay Media Studio 6.0
    Replies: 3
    Last Post: 02-25-2006, 07:22 AM
  2. List Box Object Frustration
    By Firenegn in forum AutoPlay Media Studio 4.0
    Replies: 11
    Last Post: 10-04-2004, 05:53 PM
  3. dynamic list box, part 2
    By intel352 in forum Setup Factory 6.0
    Replies: 10
    Last Post: 01-27-2003, 10:33 PM
  4. HOWTO: Set up an MP3 Playlist
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-24-2002, 11:57 AM
  5. HOWTO: Display Conditional Text Based Upon a List Box Selection
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-15-2002, 10:54 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