Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2003
    Posts
    712

    EXAMPLE: Dynamically Populate ListBoxes

    Hello,

    This example demonstrates how to dynamically insert items into ListBox objects. In this project there are two listbox objects. The first (province) is populated based on files located inside a specific directory. When an item is selected in the province listbox, the second listbox (city) is populated based on the contents of a specific file in the same directory.

    Skills Used: File.Find, Read Text File To Table, ListBox Object, Dynamically add Items, Object Interaction.
    Attached Files

  2. #2
    Join Date
    Apr 2004
    Posts
    41

    Oops Dynamic List Boxes

    Desmond

    I am writting an application that utilises your apz for dynamically updating list boxes, I can obviously change the data pre build and it works fine, but I need to point to an external 'list' that is in constant change.

    A bit on the thick side, but how can I modify your script to point to an external file that may be on a usb drive?

    The file names will remain the same on all users but the data content will be diiffent.

    Best Regards

    Phil Merry

  3. #3
    Join Date
    Jul 2003
    Posts
    712
    Hello,

    The cities for each province are loaded from seperate text files for each province through this action:
    Code:
    tProvinceFiles = File.Find(_SourceFolder .. "\\AutoPlay\\Docs\\Provinces", "*.txt", false, false, nil, nil);
    You could change
    Code:
    _SourceFolder .. "\\AutoPlay\\Docs\\Provinces"
    To point to another folder outside of your application, for example:
    Code:
    _SourceDrive .. "\\YourFolderHere"
    Desmond.

  4. #4
    Join Date
    Nov 2006
    Posts
    24
    Hi, is there any way to modify this so it looks at default folder (providence) then instead of looking at text documents it looks at folders,

    once selectd folder was selected for file list it would then display another list of txt files, when one of them was elected it would appear as a link at the bottom or in a new window ?

    many thanks :_)

  5. #5
    Join Date
    May 2010
    Location
    Lancashire, England
    Posts
    18

    Selectable results

    Hi

    Excellent script. Is there a way to make the results selectable. What I mean is when the results of the selected file are shown in the ListBox each one will open an assigned file or url when clicked.

    I tried using pipe (|) in the file then the file address e.g.

    Burnaby|http://www.lancashire.gov.uk/environ...nsport/134.pdf

    but this just shows as part of the text in the list box instead of becomming 'Item Data'.

    This function would make this example perfect for many uses.

    Any ideas appreciated

  6. #6
    Join Date
    Dec 2009
    Posts
    3
    Thanks for the ListBox_Province_City_Select_6.0.0.0.apz its come in handy

    Rhys

Similar Threads

  1. help on populate Combo Box
    By carlossequeira in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 07-19-2005, 09:23 AM
  2. Dynamically Sized Web Browser
    By The Phantom in forum AutoPlay Media Studio 5.0
    Replies: 4
    Last Post: 10-23-2004, 01:03 PM
  3. Populate a listbox
    By Lub in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 02-05-2004, 09:09 AM
  4. Please help with listboxes and window visibility!
    By tomwrn in forum AutoPlay Media Studio 4.0
    Replies: 0
    Last Post: 07-03-2003, 03:23 PM
  5. INFO: Dynamically Resizing an Application at Runtime
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-21-2002, 02:23 PM

Posting Permissions

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