[Pas2js] How to change a div (or othe widget) content

Luca Olivetti luca at ventoso.org
Mon Oct 3 16:23:44 CEST 2022


Hello,

I have a div in my html and I want to change its content. For 
consistency, I'd like to use a TDivWidget, but I could find no way to 
modify the content: I cannot manipulate the TDivWidget itself and 
creating a TLabelWidget and assigning the TDivWidget as its parent does 
nothing.

If I use a TTagWidget instead, I can use TextContent (however if I set 
it to '' it will keep the previous content).

Currently I'm using a TJSHTMLDivElement and assign its innerHTML.

There are other cases where I had to use an html element instead of a 
widget since I could find no way to manipulate the content of the widget.

Is it so by design or am I doing something wrong?

Bye
-- 
Luca


More information about the Pas2js mailing list