ok, thanks. I don't have IE so am a bit blind now. Maybe you
wouldn't mind trying the following instead and let me know if you get
50% opacity on the button?
import com.google.gwt.dom.client.Style;
pubic class WhateverYou'veCalledYourClass implements EntryPoint{
static public class StyleGWTFX extends Style{
static boolean filterAdded = false;
protected StyleGWTFX(){};
public void setAlpha(int val){
if(filterAdded)changeAlphaImpl(val);
else{
setAlphaImpl(val);
filterAdded = true;
}
}
final public native void setAlphaImpl(int val)/*-{
this.filter += "DXImageTransform.Microsoft.Alpha(opacity = "+val
+")";
}-*/;
final public native void changeAlphaImpl(int val)/*-{
this.filters.item("DXImageTransform.Microsoft.Alpha").opacity =
val;
}-*/;
}
public void onModuleLoad() {
Button fadeButton = new Button("Fade Me");
RootLayoutPanel.get().add(fadeButton);
((StyleGWTFX)fadeButton.getElement().getStyle()).setAlpha(50);
}
}
Seems you can't set IE8 filter in GWT as it starts with a '-' and GWT
will kick that out; the above is aimed at getting around that.........
Thanks,
Adam
On 4 Aug, 20:10, Ahmed Ashour <
asash...@yahoo.com> wrote:
> Hi Adam,
>
> I am using GWT 2.1.0 M2, GWT FX v0.5.0 MS 1.jar, Windows XP and IE8
>
> Putting the suggested <replace-with'> as a child of <module> doesn't have an
> effect.
>
> It seems to not work also in other Panels, e.g.:
>
> public void onModuleLoad() {
> TabLayoutPanel panel = new TabLayoutPanel(1.5, Unit.EM);
>
> Button fadeButton = new Button("Fade Me");
> panel.add(fadeButton, "That!");
> RootLayoutPanel.get().add(panel);
>
> final Fade theFade = new Fade(panel.getElement());
> fadeButton.addClickHandler(new ClickHandler() {
>
> public void onClick(ClickEvent event) {
> theFade.play();
> }
> });
> }
>
> Yours,
> Ahmed
> ----
> Blog:
http://asashour.blogspot.com
>
> ________________________________
> From: Adam T <
adam.t...@gmail.com>
> To: GWT-FX <
gwt...@googlegroups.com>
> Sent: Wed, August 4, 2010 8:51:19 PM
> Subject: Re: Fade for SplitLayoutPanel doesn't work
>
> Hi Ahmed,
>
> Do you have some details of what your using, GWT version, OS, gwt-fx
> version etc.
>
> Your above code works fine for me on Mac with Safari, Chrome, Firefox
> etc based on GWT 2.1 M2 using gwt-fx from the trunk. Is it just a
> problem with SplitPanel, or do you see it on any widget you use?
>
> If it is IE8 then maybe adding the following to your
> application's .gwt.xml file might help (if so, please let me know and
> I can update the trunk with this and stick the code in gwt-
> fx's .gwt.xml file (essentially, SplitPanel means you have to use
> standard's mode, and that is stricter on how to write filters in IE8;
> EffectImplementationIE8.java contains this, but I see I missed the
> part below that tells the compiler to use this if it is IE8)):
>
> <replace-with
> class="org.adamtacy.client.ui.effects.impl.browsers.EffectImplementationIE8 ">
> <when-type-is
> class="org.adamtacy.client.ui.effects.impl.browsers.EffectImplementationSta ndard"/