Am trying to look the code below so it will loop the current items already in the list and display them all plus any new onces added but am having a bit of trouble doing this what am I missing or doing wrong?

  Gallery.Duplicates := dupIgnore;
  Gallery.Sorted := True;
  //
  page := '<HTML><BODY BGCOLOR=000000 TEXT=00FF00><TABLE CELLSPACING=0 CELLPADDING=0>';
  page := page + '<TR>';
  page := page + '<TD ALIGN=CENTER VALIGN=TOP>';
  page := page + '<TABLE CELLSPACING=3 CELLPADDING=0>';
  page := page + '<TR><TD ALIGN=CENTER>';
  page := page + '<IMG SRC="'+FileDir+FileName+'" height="128" width="128" border="0">';
  page := page + '</TD></TR>';
  page := page + '<TR><TD ALIGN=CENTER>';
  page := page + UserName;
  page := page + '<BR></TD></TR>';
  page := page + '</TABLE>';
  page := page + '</TD>';
  page := page + '</TR>';
  page := page + '</TABLE></BODY></HTML>';
  //
  Gallery.Append(page);
  //
  for i := 0 to Gallery.Count -1 do
  begin
    WBLoadHTML(GalleryBrowser, Gallery[i]);
  end;

Thanks

What "bit of trouble" are you having? Are you getting an error message? What is going wrong?

What is WBLoadHTML?

Each element in the string list is an HTML document. You call WBLoadHTML for each one. What is WBLoadHTML supposed to do? Open a new tab for each page? Display each page for a time before you call it again?

If you want to display all the images on the same page then I suspect you should put your loop inside your <TR> tags to load each image then call WBLoadHTML only once. If so, Gallery should hold the image file names rather than the HTML, and you should pass your Page string as the second param in WBLoadHTML

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.