Grab of picture of control

Hi All

I’m trying to get a graphic grab of a weblistbox and place it into a canvas control but unable to get my head around how to do it. I tried to follow the examples and example projects but all seem to be for the desktoplistbox using the backdrop method which does not seem to exist on the weblistbox

Any pointers or examples will be appreciated

using windows 11 and 220R2

Thanks in advance

What do you want to achieve ?

Do you want to grab the image of the Weblistbox and put that in a WebCanvas ?

I am not aware of any way to do that in pure Xojo Web.

However, you may be able to do that in JavaScript.

This may help:

Hi Michel

Thanks for the prompt reply.

I have a weblist box which I’m loading with about 20 rows max and 9 columns and using the style to remove the padding so I can get a more compact view but each time I load it , it starts with the fully padded cells the reduces the giving an unpleasant viewing. as the size changes evey time data is changed. (ill try to upload a example shortly.) The idea which I read on one of the posts is to load the view into a static graphic in a canvas, hide the listbox while it loads then swap them back when finished loading.

Not sure if its practical but wanted to try… unless someone has a better way

Thanks

Grant

You could do a screen shot of an empty weblistbox and indeed display that not in a canvas (webcanvas is rather slow), but in a WebImageView. Then do as you describe, load the webListBox as invisible, and then switch.

The other way to proceed would be to draw the content of the first visible lines on the WebListBox in a WebCanvas. If you don’t have too many rows, it should not be that difficult.

Ok thanks Two good alternatives I’ll try

Ta

Grant