I have a number in my database witch is 22, and means i have 22 images in one folder that i would like to create strings from ..
The other thing is that in each div tag i can ony have maximum 3 images, the first images gets the number 22(should be 1) while the two others gets 2 and 3(Witch is correct). I can only get 3 images to show and not all 22 in seperate divs
Code below:
Code
if (CurrentPage["AntallBilderFlash"] != null) // CurrentPage["AntallBilderFlash"] is the number 22//i = i+3; //this.Controls.Add(Label1); i++; } while (i < b); }
thanks for helping me out if you can..
And yes my english is bad :)

CrishRank #1,487 · 1.1K reputationPosted Dec 1, 2010, 9:30 PM EST
I think this code will help you and if you want to understand it and get more detail about it than go for link.
http://www.daniweb.com/forums/thread226032.html
Example::
for file in files[:]:
image = Image.open(filedir+"/"+file)
##((width, height))
image.thumbnail((160, 240))
photo = ImageTk.PhotoImage(image)
label = Label(image=photo)
label.image = image # keep a reference!
label.pack()
print files
return