WebListBox CellPicture in 2.0

Hi, I am just starting out testing Xojo (have been developing in various languages, including Java, C#, Python, VB (ages ago), FileMaker, etc. for 30 years) and with the newness of Web 2.0, I am hoping that I have not picked a bad time to start out. I have been trying to consume all of the content and tutorials that have been posted to Xojo’s YouTube channel, as well as reading through the forum here.

I have searched the forum for adding pictures to a WebListBox. It seems that some time ago there was a method added to WebListBox named CellPicture that allowed this (previously there were some JavaScript workarounds). When searching the current docs, I see no mention of a method called CellPicture. From the forum it seems it was added to the docs in 2016. I am not sure if this has been removed in Web 2.0, and if so is there a better way of creating list boxes with a column of images for Web 2.0?

I am a little surprised, for web applications, that there is no repeater or iterator control that can be used to create repeating free form rows for the web that would allow us to easily style and create rows of code that is usually used on many types of websites - or is that how the WebListBox can be used? I am looking at the WebListBox as a data grid type control, but perhaps it can be used in multiple ways…

Also, I am wondering if I am just starting out testing Xojo, am I better off working with Desktop, Web or iOS? I really like what I see, but I am a little concerned that there might not be enough documentation and tutorials on the new web techniques.

Thanks and looking forward to getting to know everyone here.

I apologize if my initial post was too wordy. As it was my first post on the forum, I was trying to introduce myself as well as ask a couple of questions.

To summarize, I’m wondering if the CellPicture method of the WebListBox is still available in Web 2.0, and if not what is the recommended “Xojo way” for putting images into WebListBox cells. I had also read about the usage of an html raw tag - but I don’t know if that would be the correct way for inserting pictures in the listbox cells.


Web 2.00 is the very first version available. As such, it still has some rough edges.

CellPicture was indeed available in Web 1.00 (up to 2019R3.2), but is not available yet in 2.00.

As for choosing between Desktop, Web and iOS, since they are really different, I cannot tell you which one to pick. You will have to think about which users you want to target.

Thanks Michael for the reply. I am planning to target desktop and web initially, and would like to dive into Xojo iOS as well. I already have an Apple Developers account, but have not submitted an app to the App Store yet.

Since I am diving in new to Xojo at a time when there are some major changes - I was just wondering which platform (web, desktop, mobile) would be the best to start with in regards to available documentation and tutorials. I was hoping to get in from the beginning with Web 2.0, but I am thinking it might be a little too new to start with due to the fact that most of the tutorials I will come across will probably be referencing features that might not exist anymore. As someone new to Xojo, I’m thinking that might cause a little confusion.

As to the removal of the CellPicture method in Web 2.0, can I use an HTML raw tag to point to an image in the WebListBox cell? Is there a better / different way to do it that follows best practices for Xojo Web 2.0?

Thanks again for answering this Xojo Beginner’s questions!

Well, at least on Web 1.0 listbox sucks beyond a really simple data list. You can have sort of a repeater with a container control that acts like a row inside another container contrl that acts like the list. You add the rows with the EmbedWithin keyword and attach events with AddHandler

Web 2.0 is not feature complete so, better not to use it right now for production listboxes has something new called “Cell Renderer classes” to do this

I guess it must be web 2.0, it has the api 2.0 that is suposed to be the future for all other platforms…

You choose an interesting time to adopt xojo, lots of changes, lots of deprecations and renaming of stuff with no real benefit, lots of examples and documentation that will not work anymore.

1 Like

Thank you! I didn’t realize this was possible with the container control and will enable functionality that I didn’t think was available in Xojo Web applications!

Haha yes. I have looked at RB and Xojo for a long time - but never took the plunge. I am thinking that since I don’t have any legacy Xojo code, all of these changes that are occurring will only be to my benefit.

Since I don’t know if I am going to use Xojo or not, for production code, I am going to wait for one of those 20% sales and then pick up a Pro license so that I can test deploying code to different systems. In the meantime, I will be able to wrap my head around what is new, what is old, what has been removed and what has been added. I hope Paul starts producing a lot more YouTube tutorials showing off all of these new features!

This is working code from my “testing playgroung” in Web 2.0

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

For each result as string in results
  lbServers.AddRow( "" )
  lbServers.CellValueAt( lbServers.LastAddedRowIndex, 0 ) = format( counter, "00000" )
  lbServers.CellValueAt( lbServers.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
  lbServers.CellValueAt( lbServers.LastAddedRowIndex, 2 ) = picCell
  counter = counter + 1

“lbServers” is the name of my listbox …


Thank you for that code. I had been looking through the docs and was not able to piece that solution together.

In fact, I didn’t even notice WebListBoxImageRenderer existed haha.

1 Like

You are welcome and no worries, it took me a while as well ;-).

HI Jeannot,

I didn’t find any sample that done that. I’m wondered, how come did you explore that solution?

@ronaldo_florendo And for the rest I played around - I’m committed and stubborn :slight_smile:


There! I didn’t explore that part because websdk is a bit hard to understand for me. oh thank you!

1 Like

I forgot to mention that I’m curious too :slight_smile: - I got most of my knowledge in Xojo in the past 15 years by reading code from others …

Yeah. I also learned xojo thru sample codes too.

1 Like