HOW TO : How to add html code in servoy

Hi there,

I want to add some HTML code in my servoy project.

I tried to add HTML code in label object (named lblHTML) like

var html = “

some text here
”;

forms.testForm.lblHTML.Text = html;

but i guess it is not a good idea to add HTML sort like that.

Next, I tried HTML pane to add HTML code.

But actually I’ve no idea with HTML pane.

Could you pls show me how to do with HTML pane??

Thanks indeed

Aung Mon

amchtwe:
forms.testForm.lblHTML.Text = html;

This should actually be: ```
forms.testForm.elements.lblHTML.text = html;


Hope this helps!

Hi mboegem,

Thanks for your reply.

i tried like what you said “forms.testForm.elements.lblHTML.Text = html;”

but u know, label object is not very good to show html in the servoy, i guessed.

it can only show limited area and if my data in the html area is dynamically grow then it can’t show he entire html are.

I want to use some other object rather than HTML code inside label object.

try a html-area when using global- or form variable.
This should give a better result.

Generally: the standard display options of html within java are not of the most brilliant kind, so you’ll find some restriction on what is possible.