Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Posts
    2

    How can I made listbox

    I hope to made a listbox that do the flowing items

    Item Name Item Data
    song1 Directory = CD_Root\AutoPlay\Audio\File Name
    song2 Directory = CD_Root\AutoPlay\Audio\File Name
    song3 Directory = CD_Root\AutoPlay\Audio\File Name

    and so on

    when I click song1 it's play audio with song1
    when I click song2 it's play audio with song2

    Please Help me to made this code

    Thanks

  2. #2
    Join Date
    Jul 2005
    Location
    Egypt
    Posts
    88
    Check this topic .. Will help you a lot :
    http://www.indigorose.com/forums/showthread.php?t=7485

  3. #3
    Join Date
    Oct 2005
    Posts
    24
    maybe this will help !


    Button : On Click

    -- Display a folder browse dialog
    sDirectory = Dialog.FolderBrowse("Please select a folder containing the music files you wish to add to the ListBox", "");

    -- Ensure the user did not press cancel
    if sDirectory ~= 'CANCEL' then

    -- Find all the files in the directory
    tFiles = File.Find(sDirectory, "*.mp3", false, false, nil);

    -- If tFiles contains something
    if tFiles then

    -- Traverse the table containing the selected file paths
    for nIndex, sFilePath in tFiles do

    -- Assign the desired text and data to variables
    sData = sFilePath;

    -- Set sText to the filename (without extension) using String.SplitPath
    sText = String.SplitPath(sFilePath).Filename;

    -- Add the item to the ListBox
    ListBox.AddItem("ListBox1", sText, sData);
    end
    end
    end

    Listbox : On Select



    tSelected = ListBox.GetSelected("ListBox1");

    sData = ListBox.GetItemData("ListBox1", tSelected[1]);
    MediaPlayer.Load("Plugin2", sData)

Similar Threads

  1. Listbox problem
    By krayten in forum AutoPlay Media Studio 6.0
    Replies: 32
    Last Post: 07-09-2007, 03:57 AM
  2. Example: Using the ListBox object
    By Ted Sullivan in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 05-07-2004, 12:24 PM
  3. Listbox... how to? part 2
    By cold_fusion in forum AutoPlay Media Studio 4.0
    Replies: 7
    Last Post: 02-07-2004, 12:28 PM
  4. Dynamic ListBox
    By Bruce in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 01-06-2004, 09:13 AM
  5. From listbox to listbox to flash
    By Konradsen in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 05-13-2003, 06:24 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