Roughian Examples Site Map - GWT Examples - Tutorials

HTML Widget


Version 1.0 onwards

The HTML Widget lets you add HTML to your application



Listeners



Notes


You simply create it with HTML in it like this HTML widget = new HTML( "<div id='fred' style='background-color: yellow; border: 1px dotted red; width: 200px; text-align: center;'> This is an HTML Widget </div>");

As well as the setHTML() method which you can use to set the HTML content after creation, there is a setText() method which you can use to prevent HTML injection by a user. In most cases like that, you'd be using a Label instead.