Fill Listbox

This is a discussion on Fill Listbox within the C++ Programming forums, part of the General Programming Boards category; Aargh I cant get a listbox filled with numbers from 0 to i; the function (OnLCick) for(n=0; i <= end; ...

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    7

    Fill Listbox

    Aargh

    I cant get a listbox filled with numbers from 0 to i;

    the function (OnLCick)

    for(n=0; i <= end; i++)
    {
    ->Items->Add(i);
    }

    doesnt seem to work as it only adds 1 number when I click the button. How do I increment the position where it writes to the listbox so it adds all numbers from 0 to i;

    tnx

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,578
    Code:
    ->Items->Add(i);
    Somehow I doubt you can do that
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    What OS are you using?
    Are you using a wrapper?
    As it seems to be a GUI program, it should be posted to Windows or Linux programming. (Unless you're using some other OS or some multi-platform wrapper).

    USE CODE TAGS
    "The Internet treats censorship as damage and routes around it." - John Gilmore

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ListBox Extra Data Storage
    By Welder in forum Windows Programming
    Replies: 1
    Last Post: 11-01-2007, 02:46 PM
  2. Replies: 3
    Last Post: 12-22-2004, 07:29 PM
  3. cant load dialog with listbox, help
    By terracota in forum Windows Programming
    Replies: 2
    Last Post: 11-22-2004, 07:11 PM
  4. How to cast a ListBox item to an int for a switch statment?
    By Swaine777 in forum C++ Programming
    Replies: 8
    Last Post: 09-26-2004, 09:52 PM
  5. Getting FULL filename from listbox
    By Garfield in forum Windows Programming
    Replies: 8
    Last Post: 01-27-2002, 08:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21