Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3656

WebContainer embedWithin in a loop

$
0
0

Hi

Using Xojo 2024r1.1, I am getting this error adding WebContainers in a loop (7 containers). “Each WebContainer instance may only be embedded once”

I am instantiating each new WebContainer and setting the text to display, but it fails when embedding in the parent container.

Here is the section of code

var hc as new HorizontalContainer
hc.DateLabel.text = formattedDate
hc.ForecastLabel.text = forecastText
self.EmbedWithin(hc, 0, top, hc.Width, hc.Height)
top = top + hc.Height

This code is running in the ContentReceived event of a WebConnection.

Not sure what’s happening, what else I can try?

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 3656

Trending Articles