learn | unlearn | relearn

In Xojo’s new Web Framework 2.0, you need to use a special renderer “WebListBoxImageRenderer” to easily add pictures to a WebListBox:

Var counter as integer = 1
Var pic as WebPicture = gray // gray is a picture created within xojo

For each result as string in results
  myListBox.AddRow( "" )
  myListBox.CellValueAt( myListBox.LastAddedRowIndex, 0 ) = format( counter, "00000" )
  myListBox.CellValueAt( myListBox.LastAddedRowIndex, 1 ) = result
  var picCell as new WebListBoxImageRenderer
  picCell.URL = pic.URL // link to the embedded pic, alternatively use a url to any picture on the web
  myListBox.CellValueAt( myListBox.LastAddedRowIndex, 2 ) = picCell
  counter = counter + 1
next

Comments

Sign in or become a jeannot-muller.com member to join the conversation.
Just enter your email below to get a log in link.



You’ve successfully subscribed to jeannot-muller.com
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Your link has expired
Success! Check your email for magic link to sign-in.