Results 1 to 3 of 3

Thread: Working with list boxes...

  1. #1
    Cypher02030
    Guest

    Question Working with list boxes...

    I'm still working on my RPG...now, in the inventory menu, I'm going to have a list of the party's item in a list box to display them. Now, is it possible to have the user click on an item, and, for instance if it was a potion of healing, have it heal the person, and minus on eto inventory? If so, how do I figure out which item it is they click on? And then make it do something? Thanks

  2. #2
    Addicted Member
    Join Date
    Apr 2000
    Location
    England
    Posts
    246
    the click event of a listbox will do, you can then refer to list.selected to get the selected item, then just -1 from your inv variable, update the listbox, add health to your health variable etc
    Some Days, i just get this feeling that i'm helping to write dozens of Viruses...

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Originally posted by Cypher02030
    If so, how do I figure out which item it is they click on?
    VB Code:
    1. Msgbox List1.List(List1.ListIndex)

Posting Permissions

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



Click Here to Expand Forum to Full Width