Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2002
    Location
    Queensland Australia
    Posts
    64

    Listbox running totals

    Hello

    I have 12 listboxes with numbers as selections , and 1 Label object , how do I do this , as a user selects a number in one listbox than selects another number in another listbox and another so on and so on , that the Label object keeps a tally by adding the choesn numbers together and displaying the running total number .

    Thanks Rod

  2. #2
    Join Date
    Sep 2002
    Location
    Queensland Australia
    Posts
    64

    re

    Sorry Guys they are 12 combo boxes .

    Rod

  3. #3
    Join Date
    Sep 2002
    Location
    Queensland Australia
    Posts
    64
    Ive hacked me way this far but hit a bit of a wall , my combo boxes have 3 slots with the numbers 8 9 10 , but this dont display the number selected but the slot number its sits in the combo 1 2 or 3 is displayed .

    I also tried to set BR1 as a variable so I can add it to the next combo selection , I dont know it thats the right way to do what I want , heres the code that displays the wrong numbers .


    Thanks Rod

    selected_item = ComboBox.GetSelected ("B1");
    if (selected_item ~= nil ) then

    Label.SetText("BScore", selected_item)
    BR1 = selected_item

    end

  4. #4
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    litle project with 6 comboboxes

    see:
    1. Project / Global Functions / function 'math()'
    2. ComboBox Properties / Script / On select


    Stefan_M
    Attached Files
    "With a rubber duck, one's never alone."

    Douglas Adams, The Hitchhiker's Guide to the Galaxy

  5. #5
    Join Date
    Sep 2002
    Location
    Queensland Australia
    Posts
    64

    re

    Good one Stefan I,ll hook into it and see what I can see

    Thanks Rod

  6. #6
    Join Date
    Sep 2002
    Location
    Queensland Australia
    Posts
    64

    re

    I just had a look at and cant get the gist of it , the combo boxes work the same mine do , where you select say No 12 in the 3rd row and it displays 3 in the input box I want it to display the 12 .

    I,ll keep diging at it , the answer is prolly in it but Im having a hard time seeing it .

    Rod

  7. #7
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    its the function: ComboBox.GetItemText

    Code:
        
    _selected = ComboBox.GetSelected("ComboBox"..x);
    sum=sum+ComboBox.GetItemText("ComboBox"..x,_selected)
    Stefan_M
    "With a rubber duck, one's never alone."

    Douglas Adams, The Hitchhiker's Guide to the Galaxy

  8. #8
    Join Date
    Sep 2002
    Location
    Queensland Australia
    Posts
    64
    Stefan , does this , get the item as a text or a number , I need it to be a number so that I can set it as as a varible , so that if no 12 is selected thats whats displayed and a varible is set for 12 , does that make sense

    Thanks Rod

  9. #9
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Code:
    _selected = ComboBox.GetSelected("ComboBox"..x);
    sum=sum+String.ToNumber(ComboBox.GetItemText("ComboBox"..x,_selected))

  10. #10
    Join Date
    Sep 2002
    Location
    Queensland Australia
    Posts
    64

    re

    Ah , thanks Worm .

    Rod

  11. #11
    Join Date
    May 2005
    Posts
    1,115
    You might rather use datagrid plugin instead a 12 listboxes for that...
    Never know what life is gonna throw at you.
    (Based on a true story.)

Similar Threads

  1. Listbox disappearing question
    By ebrusher in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 07-09-2005, 06:38 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. Checking If a Particular Program is Running
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 01:31 PM
  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