Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6

Thread: Listbox Help

  1. #1
    Join Date
    Jun 2004
    Posts
    113

    Listbox Help

    I am just learning how to use this great program just now and I was wanting to learn how to make data save in the list box, what I have made is a url saving type app, anyway - I have got a listbox and inside the listbox is urls, when you click on them you should jump to the webpage.
    I have also got two input boxes, one is for the url and one is for a description.

    What I want to be able to do is input text into this box and then it be saved into the listbox, I have got it saving to a text file just now - how can I get it to save into the listbox?

    The attatchment is what i have done - this will explain it better.

    Sorry for asking these stupid questions, but that is how I will learn - Thanks.
    Attached Files

  2. #2
    Join Date
    Jun 2004
    Posts
    113
    Quote Originally Posted by mrdude
    I am just learning how to use this great program just now and I was wanting to learn how to make data save in the list box, what I have made is a url saving type app, anyway - I have got a listbox and inside the listbox is urls, when you click on them you should jump to the webpage.
    I have also got two input boxes, one is for the url and one is for a description.

    What I want to be able to do is input text into this box and then it be saved into the listbox, I have got it saving to a text file just now - how can I get it to save into the listbox?

    The attatchment is what i have done - this will explain it better.

    Sorry for asking these stupid questions, but that is how I will learn - Thanks.


    ---Ok I best make myself clearer I know how to make the text and data go into the listbox and run- but when I start the app again, I want the previous data to still be there, Obviously the data needs to be saved to a file - and then reloaded again once the app starts, is there a command to do this?

  3. #3
    Join Date
    May 2004
    Location
    Vancouver, BC, Canada
    Posts
    87

    Hi,

    You won't be able to save the data the user adds in the list box, in Runtime.
    Like you thought you should keep everything in text file, let the users append new address to the text file.
    (After the appending you can add it to the list box to show the user his data received.)
    Every time you lunch your program load the data from the file.
    You can append the data in the text file in certain order like address#name.
    When you read the file look for the divider # and you'll know what is the address and what is the name.

    Itamar.

  4. #4
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Or you can add your data to an associative table. At exit (or when leaving the page) you write the table to a CSV (Comma Separated Values) text file. At next run the table is populated with the text lines.

    In a previous post - Tables, CSV (Excel) and Reports - I attached an example which could be named “XX Fan Club – Member archive”. Each record has a layout like this:
    102,Jason Anderson,Winipeg,jason@dot.com,15 000,25
    (RecID,Name,Address,Email,Amount)

    Maybe this project can give you some ideas?

    Extract from the code:
    (Variable cList = "," in US, ";" in Europe)
    Code:
    tblDB[TblIdx] = {F1=Input.GetText("inpF1"), F2=Input.GetText("inpF2"), F3=Input.GetText("inpF3"), F4=Input.GetText("inpF4"), F5=Input.GetText("inpF5")};
    
    recData = tblDB[item].F1..cList..tblDB[item].F2..cList..tblDB[item].F3..cList..tblDB[item].F4..cList..tblDB[item].F5..cList;
    
    Table.Insert(tblText, 1, recData);
    TextFile.WriteFromString(datafile, tblText[item] .. "\r\n", true);  -- add record to file

  5. #5
    Join Date
    Jun 2004
    Posts
    113
    Hey that's great! That's just the kind of thing I was looking for, man this forum rocks!.

    Thanks very much guys, right i'm off to play now

  6. #6
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    man this forum rocks!.
    Hellllooooooo Cleveland!

    Corey Milner
    Creative Director, Indigo Rose Software

Similar Threads

  1. 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
  2. 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
  3. Dynamic ListBox
    By Bruce in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 01-06-2004, 09:13 AM
  4. Continious play of MP3 in a ListBox
    By Alien in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 08-06-2003, 07:55 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