I am using smart GWT to develop my application, to create the structure of the application I am using GWT components. The HTML code snippet is as below:
<div class="container">
<div id="pagePanel" ></div>
</div>
In my pagePanel
div all the components are added. As I add components dynamically in the pagePanel
div, the pagePanel
div does not enlarge as per the size of the added component and the added smart gwt components overflows the pagePanel
div. So I need to give css to each and every div of smart gwt.
But as the GWT generates HTML structure on its own it is not possible to find all the div in code.
As, I am using flex table to structure my page, FlexTable is added in Canvas of smart gwt. Canvas
is added to initWidget
of Composite
super class.
I gave css to flex table and canvas but between the canvas and flex table two more divs are generated and I cannot get how to give css to these divs as I am not able to find them in my code.
The code is as below:
NTCanvas smartContainer = new NTCanvas();
smartContainer.setWidth("970px");
smartContainer.setStyleName("smart-container");
smartContainer.setStylePrimaryName("smart-container");
initWidget((Widget) smartContainer);
Can any body tell how to locate the gwt generated divs in code. Or how to solve the overflow problem of smart components from PagePanel div.
Thanks, Punam Purohit
Covered in the SmartGWT FAQ:
http://forums.smartclient.com/showthread.php?t=8159#aMix