Closed Thread
Results 1 to 2 of 2

Thread: Listbox help please

  1. #1
    2710 is offline Programmer
    Join Date
    Sep 2008
    Posts
    108
    Rep Power
    0

    Listbox help please

    Hi,

    Say I have a listbox, and I have an item in there already selected/highlighted, how do I read the text?

    What function do I use?

    I keep typing listbox1.selected, but it keeps asking for a integer index. after, ie it wants:

    listbox1.seletced[#]

    But I don't know the number/index, since I can select any of the rows. Can't delphi just read the text from my highlighted row?

    Thanks

    EDIT: Wait I already asked this question before LOL, apparently I have already solved this. Nevermind people >__>

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Rustix666's Avatar
    Rustix666 is offline Newbie
    Join Date
    Dec 2009
    Posts
    15
    Rep Power
    0

    Re: Listbox help please

    listbox1.items[listbox.itemindex];

    //listbox.itemindex - # of selected item

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Images in listbox (.NET)
    By hampus.tagerud in forum Visual Basic Programming
    Replies: 1
    Last Post: 04-10-2010, 08:58 PM
  2. Help with Listbox!!!
    By albeano in forum Visual Basic Programming
    Replies: 7
    Last Post: 04-03-2010, 11:08 AM
  3. Possible to tag a value onto a listbox item?
    By 2710 in forum Pascal and Delphi
    Replies: 12
    Last Post: 02-16-2010, 01:58 PM
  4. Listbox to Checkbox
    By Christoph in forum Visual Basic Programming
    Replies: 11
    Last Post: 07-19-2009, 12:11 PM
  5. listbox and array
    By davisco in forum Visual Basic Programming
    Replies: 1
    Last Post: 11-20-2008, 09:51 AM

Tags for this Thread

Bookmarks

Posting Permissions

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