Hi Ed, IE is always going to throw you some interesting challenges. The one you've hit here relates to IE only applying filters if an element has "position". You've achieved that by directly setting the element's height; another, perhaps more common way is to set the zoom style property to 1, i.e. element.getStyle().setProperty("zoom", "1");
You might also want to note that your code will not work in IE8 in strict mode as Microsoft are finally beginning to edge towards something resembling standards compliance, and the "filter" CSS property is replaced with the more correct "-ms-filter" (eg. see: http://acidmartin.wordpress.com/2008/11/28/setting-opacity-and-other-filters-in-internet-explorer-8/) //Adam On 16 Juli, 00:42, Ed <post2edb...@hotmail.com> wrote: > He, > The following occurred against 1.6.4. > > In hosted mode (IE 7 I quess as I have IE7 installed) I found out that > when I set the opacity in a FadeInAnimation.update(double) class that > is a subclass of Animation, it has no effect until I first set some > other style property... > > Example: > In the FadeInAnimation.update method, I do something like (for IE in > hosted mode): > ----- > update(double progress) { > getElement().getStyle().setProperty("filter", "alpha(opacity= " + > value * 100 + ")");} > > ---- > > I tried the above in several ways, with the following simple test: > --- > FlowPanel main = new FlowPanel(); > RootPanel.get().add(main); > HTML html = new HTML("some text<br>more text<br>"); > main.add(html); > FadeInAnimation an = new FadeInAnimation(html.getElement()); > an.run(10000); > --- > > The html widget kept on showing up immediately, until I set another > style like the height in the above update statement before setting the > opactity, like: > ---- > update(double progress) { > this.element.getStyle().setProperty("height", "200px"); // NEW > this.element.getStyle().setProperty("filter", "alpha(opacity= " + > value * 100 + ")");} > > ----- > > And all of a sudden it worked... Appearantly the opacity statement > doesn't trigger a css refresh. > Anybody an idea what's happening here? Doe anybody else experience > this as well, or can try this ? > > BTW: I used a clean html page without any style definitions to make > sure that not some strange style was causing this. > > Ed --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---