I want to point out a difficulty I have with adding gwt widgets to smartgwt canvases.
If you directly add the gwt widget to a canvas, it adds a WidgetCanvas around it. The essential problem is that when you create a widget canvas, the constructor sets the size based on the widget's dom attributes, not the size set using setwidth on the widget object. This invariably leads to the WidgetCanvas being 100x100 because the size isn't set in the dom.
If you can add a WidgetCanvas yourself you can set the size yourself, but otherwise you need to do something like:
If there's a better way to do this I'd be very interested to know, but otherwise please make the widgetCanvas at least look at the object's attributes.
If you directly add the gwt widget to a canvas, it adds a WidgetCanvas around it. The essential problem is that when you create a widget canvas, the constructor sets the size based on the widget's dom attributes, not the size set using setwidth on the widget object. This invariably leads to the WidgetCanvas being 100x100 because the size isn't set in the dom.
If you can add a WidgetCanvas yourself you can set the size yourself, but otherwise you need to do something like:
Code:
libraryCanvas.getChildren()[0].setHeight(height); libraryCanvas.getChildren()[0].setWidth(width);
Comment