PDA

View Full Version : Another ListBox question


Bruce
12-20-2003, 05:02 PM
What if an item in a ListBox represented both a zip file and an image? How would I go about unzipping on double click and loading and viewing the image file on select? Is there a way to tell it (ListBox) where to find both and what to do with them?

Thx

Corey
12-20-2003, 05:10 PM
Hi. OK, you know how to attach an action to an item in the listbox right? It's just as easy to add 2-3 actions as one...

Break down the task into smaller parts Bruce then it's easy, i.e.:

1. Create a listbox.
2. Attach a simple action to one of the items.
3. Test it.
4. Remove test action.
5. Attach an action to load the image object.
6. Test it. Repeat step 5 as needed.
7. In the same place you attached the image load action extend the code to unzip your file.
8. Test it. Repeat step 7 as needed.
9. Have a sandwich.

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

TJ_Tigger
12-21-2003, 10:15 AM
If step 9 were "Have Donuts" Homer would be happy.