I'm working on text-based role playing game that uses a GUI for some of the functionality. After a bit of a learning curve I've got the GUI done and am in the process of figuring out how to implement some of the other features. One thing I have run into involves something I'm doing with 2 listboxes.

If you look at the image I've attached to the post you'll see that I have 2 listboxes with some buttons below them. For this particular issue only the "To Mule" and "To Me" buttons are relevant.

First let me give a bit of background so that the problem will hopefully make more sense. I've got a table that contains instances of items that will be found in the game. I say instances because I decided it would be easier to track the items that way rather than by manipulating the actual items table. So, that said, each item instance has a unique ID that becomes very critical in being able to manage if game items move, are destroyed, etc.

The two listboxes in the attached image are being populated from the item instances table. Where I am running into problems is that if I have multiple listbox items with the same value in one listbox, I have no way of distinguishing between those identical items when I go to update the database table.

I am hoping that I am missing something here. Is there some way to add the ID from the item instances table into the listbox items? Sort of like how in HTML when using a SELECT tag you can assign a value to each OPTION in addition to the text that is shown in the form.

Does any of my explanation make sense? :) If not, I'll try to clarify what I'm talking about. If anyone has any ideas or suggestions, thanks in advance for the input!

Attachments listbox_problem.JPG 13.48 KB
8 Years
Discussion Span
Last Post by sneekula

Well I decided to give the pack mule a break, so this topic is no longer an issue. :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.