Hi All,

I have a small application that works great in FireFox and Safari but every
time I try to load it into IE 7.0 it completely fails.  I get an unspecified
error.  The following is JavaScript code contains the error:

function $onWindowResized(this$static, width, height){
  var shortcutHeight;
  shortcutHeight = height -
(this$static.scrollPanel.element.getBoundingClientRect().top + ($clinit_51()
, documentRoot).scrollTop) - 8;
  if (shortcutHeight < 1) {
    shortcutHeight = 1;
  }
  this$static.scrollPanel.element.style['height'] = shortcutHeight + 'px';
  $adjustSize(this$static.objectDetail, width, height);
}

It fails when shortcutHeight is set.  I can associate this with the
following lines of GWT java code:

    public void onWindowResized(int width, int height) {
        int shortcutHeight = height - scrollPanel.getAbsoluteTop() - 8;
        if (shortcutHeight < 1) {
            shortcutHeight = 1;
        }
        scrollPanel.setHeight(shortcutHeight + "px");
        objectDetail.adjustSize(width, height);
    }

The line

int shortcutHeight = height - scrollPanel.getAbsoluteTop() - 8;

appears to be the problem.  The variable scrollPanel is of type
ScrollPanel.  It contains a Tree.  If I remove the scroll panel and just
display and resize the tree it works but I now longer have scrolling and the
tree falls off the screen.  I read somewhere that you should be careful when
you attempt to resize widgets and that sometimes it works and other times it
does not depending on how the widget is rendered.  Is this the source of the
problem?

My real goal is to layout an application like the a mail application (from
the GWT Tutorial) with the left hand side containing a scrolling tree
control.  To support this I create a ScrollPanel and add my tree.  I then
set the height when the window is resized.  This creates the desired effect
on all platforms except IE.  Any suggestions on how I can support this?

Thanks,
Arend

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to