Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Posts
    5

    File to List box

    Dear Fiends,
    I am trying to do this:
    I have a text file which has two colums seperated by a tab char. and it's quite long so I want to automate the following:

    I want to read the contents of the file into a list box, where the first column is the itemtext and the text after the tab char will be the itemdata. Then I must save my project at runtime because I want these values saved.

    I have tried to do this on my own without success!

    Please rescue!

    PP

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Look at the TextFile.ReadToTable. Once you have the text file in a table, use a for loop to step through the table and for each item search for the \t (tab) character. Then with the tab position found use String.Left and String.Mid to extract the two components, then add to the ListBox using those two items.

    Hope that helps get you started, there are some great examples in the Examples forum on using list boxes.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. How to exclude specific filenames in a File List box?
    By jbarr in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 11-28-2003, 12:11 AM
  2. How to include only specific filenames in a File List box?
    By jbarr in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 11-20-2003, 01:40 PM
  3. 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
  4. 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
  5. Replies: 0
    Last Post: 08-17-2000, 02:29 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