Problem with resize webContainer at runtime , xojo2023r3

I created a webContainer with a width =500,
when I press a button (inside webcontainer) yje button code set the width of the webcontaner to 100, but absolutely nothing happens

I instantiated the webContainer by dragging a copy directly onto the webPage

Does anyone have any suggestions on this

It works as expected for me.


No problems here:
container.2023-10-18 16_27_03

1 Like

Me.Parent.Width = 100 '?

Hard to guess if you dont show the code.

1 Like

ok add a weblabel on the right side of the webcontainer beyond the width of the webcontainer

you will see that even if the width of the webcontainer is smaller than the left side of the webLabel, the weblabel will always be shown
but if the With of webconteriner Is lower then the left position of weblabel, weblabel must no be showed

il problema e’ che tutti i controlli inseriti nel webcontainer vengono sempre visualizzati
l’esempio pratico, aggiungi una weblabel nel webcontainer, con posizione left = 500
poi setti la larghezza del webcontainer a 400
se aggiungi il webcontainer ad una webpage, la weblabel che non dovrebbe essere mostrata in quanto la larghezza del webcontiner e’ inferiore al left della weblabel , viene comunque mostrata , qualsiai larghezza tu attribuisca al webcontaire

And that has nothing to do with resizing per se.

You just have to add the bootstrap class overflow-hidden to hide overflown content…

It is a shame that xojo hasnt implemented an easy way to use the bootstrap clases, you have to use a hack to modify the html.

In the opening event of the container:

ExecuteJavascript( "$('#" + Me.ControlID + "').addClass('overflow-hidden');" )
1 Like

top, thank you

second problem,
the resize event of istanced webcontainer is not fired when the button of webcontainer is pressed

ok, i have create new webContainer event (Resize2) and i call this event where webcontainer button is pressed, this event is fired when press button inside the webcontainer and i can put the code inside this event

You should create a diferent thread to different problems.

Yeah, xojo web is a mess, MANY piled bugs. Currently this event is not working when the control is resized but it fires when the browser is resized, even if the control is NOT actually resized. :sweat_smile:

At least Web2 is consistent with Web1:

Do you know if there is an Issue created to change this unexpected behavior?

Not fot the webcontainer but there is one for the XojoVisualControl with but looks like the same problem

1 Like

At now i have not create an issue