WebListBox CellPicture Does Not Show

I’ve run into an issue where an image loaded using WebListbox.CellPicture will show when using the RemoteDebuggerConsole but does not show in the compiled stand-alone web app. Using the same source WebPicture loads and displays without issue within a WebCanvas using the paint event.
I’ve attempted a preload, changing permissions and owner of the source images, and using the source images elsewhere in the project.


Any thoughts or suggestions are appreciated!

Target: ARM
Xojo 2019 r1.1

Where do you put this code ?

I’ve tried 2 variations of code, first in ListBox1(Shown). I then tried moving the same code to ListBox1(Open). Both function in debugger.

First Variation, Select Case:

[code]Select Case UsrLevel(6)

Case “*”

Case “**”

Case “***”

Case “****”

End Select[/code]

Second Variation:

If UsrLevel(6).trim="*" then me.CellPicture(me.LastIndex,0)=Img1 If UsrLevel(6).trim="**" then me.CellPicture(me.LastIndex,0)=Img2 If UsrLevel(6).trim="***" then me.CellPicture(me.LastIndex,0)=Img3 If UsrLevel(6).trim="****" then me.CellPicture(me.LastIndex,0)=Img4

For the life of me, I can’t figure out why (all of) the code variations work in the debugger but not in the compiled app.

If you dragged the pictures into the project, make sure that the pictures are in the Resources folder that must accompany the app and be uploaded with it.

Thanks Michel-
I have tried both loading from the drive as well as dragging the images into my project- same results, unfortunately. I created a test project to isolate the code. All images render as expected, so there’s something else going on.

  • loaded the images into a Canvas from the same webpicture property I call for cellpicture in the listbox. Canvas renders, cellpicture does not.

This is what I’ve tried in addition to what I’ve listed previously. The same code/changes in the test project render as expected:

  • Deleted the listbox and created a new one.
  • Removed any/all styles tied to the listbox.
  • Altered the cell column width and row height to be much larger than needed.

Anyone have additional ideas to isolate this issue that I haven’t tried yet?

Make sure that the webpictures are created in the same session that you’re using them in or that their Session property is set to Nil.

This could be the issue: me.CellPicture(me.LastIndex,0)=Img1

Perhaps by the time you do that, the code that creates the cell has not have time to create the cell.

You may want to make sure to put this code after addrow has indeed completed. You could try using a timer.

I found the problem when working on another project. Same situation where running RemoteDebuggerConsole would work as expected but the compiled app would not draw the image into a WebListbox Cell. The problem was in the string being queried.

The second project with this issue was reading output from NetworkManager, getting the signal strength of available networks. Runtime debugging showed the string as:

"* " "** " "*** " "****"

I would assign a signal strength PNG accordingly.

The compiled application, however, this is what the string was:

"?___" "??__" "???_" "????"