Results 1 to 5 of 5

Thread: TListBox help

  1. #1
    Join Date
    Oct 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default TListBox help

    How do i get the value of a TListBox? I have tried mybox.text, mybox.value etc but i cant find it

  2. #2
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    i think from memory its ListBox1.Items

  3. #3
    Join Date
    Oct 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah ok thanks lol I will try it

    Edit: Listbox.items has all of the items in tstrings, how do i get the selected item?

  4. #4
    Join Date
    Feb 2006
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ListBox.Selected[]

    Edit:
    To get the selected item you would have to do some crazy crap like:
    SCAR Code:
    for I:= 0 to ListBox.Items.Count - 1 do
     if(ListBox.Selected[I])then
       begin
        Writeln('Item ' + IntToStr(I) + ' is selected...');
        Break;
       end;

  5. #5
    Join Date
    Oct 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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