Scranton
12-06-2003, 09:18 PM
I have a folder of jpg files being loaded into a list box. I have that part. With the following code on the page.
Folder = Folder.Find("AutoPlay\\Images\\oldfampics\\Sue Family", "jpg", false, nil);
pictures = File.Find("AutoPlay\\Images\\oldfampics\\Sue Family", "*.jpg", false, false, nil);
for j,file_path in pictures do
ListBox.AddItem("ListBox1", String.SplitPath(file_path).Filename, file_path);
end
ListBox.SetUpdate("ListBox1", true);
Now I want to be able to select the file from the list and have it display the jpg on the image object.
Here is my code on the list box but it isn't working. I also have an empty image object on the menu for the image to display in.
selected = ListBox.GetSelected("ListBox1");
for j in selected do
Image.Load("Image1", ListBox.GetItemData("ListBox1", file_path));
end
Any help would be greatly appreciated. I'm cross-eyed looking at this thing.
Thanks for any help.
Folder = Folder.Find("AutoPlay\\Images\\oldfampics\\Sue Family", "jpg", false, nil);
pictures = File.Find("AutoPlay\\Images\\oldfampics\\Sue Family", "*.jpg", false, false, nil);
for j,file_path in pictures do
ListBox.AddItem("ListBox1", String.SplitPath(file_path).Filename, file_path);
end
ListBox.SetUpdate("ListBox1", true);
Now I want to be able to select the file from the list and have it display the jpg on the image object.
Here is my code on the list box but it isn't working. I also have an empty image object on the menu for the image to display in.
selected = ListBox.GetSelected("ListBox1");
for j in selected do
Image.Load("Image1", ListBox.GetItemData("ListBox1", file_path));
end
Any help would be greatly appreciated. I'm cross-eyed looking at this thing.
Thanks for any help.