public VerticalWidgetWrapper() {
setElement(DOM.createDiv());
// this is mostly needed for IE, could be isolated
- DOM.setStyleAttribute(getContainerElement(), "overflow", "hidden");
+ DOM.setStyleAttribute(getContainerElement(), "overflow", "auto");
}
void setExpandedSize(int pixels) {
// Calculate used height
super.setHeight("");
- int usedHeight = getOffsetHeight();
+ int usedHeight = DOM.getElementPropertyInt(bottomDecoration,
+ "offsetTop")
+ + DOM.getElementPropertyInt(bottomDecoration,
+ "offsetHeight");
// Calculate content area height (don't allow negative values)
int h = targetHeight - usedHeight;
DOM.setStyleAttribute(contentNode, "overflow", "hidden");
// Calculate target height
- int targetHeight = 0;
- /*
- * if (height.indexOf("%") > 0) { // Percentage heights are handled
- * separately int parentHeight = DOM.getElementPropertyInt(DOM
- * .getParent(getElement()), "offsetHeight"); targetHeight =
- * parentHeight Integer.parseInt(height.substring(0, height.length() -
- * 1)) / 100; } else {
- */
super.setHeight(height);
- targetHeight = getOffsetHeight();
- // }
+ int targetHeight = getOffsetHeight();
// Calculate used height
super.setHeight("");
- int usedHeight = getOffsetHeight();
+ int usedHeight = DOM.getElementPropertyInt(deco, "offsetTop")
+ + DOM.getElementPropertyInt(deco, "offsetHeight");
// Calculate content area height (don't allow negative values)
int h = targetHeight - usedHeight;