Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Button with setCanHover(true); setHoverDelay(0); does not show hover

$
0
0
Hi Isomorphic,

I have this Button (v9.1p_2014-05-11, deployed, FF26.0 and Chrome 34.0):
Code:

import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.events.HoverEvent;
import com.smartgwt.client.widgets.events.HoverHandler;
import com.smartgwt.client.widgets.events.MouseOutEvent;
import com.smartgwt.client.widgets.events.MouseOutHandler;

public class ReloadImgButton extends Button {
        public ReloadImgButton() {
                super();
                setIcon("[SKINIMG]action-icon_28px/refresh-color.png");
                setBaseStyle("actionButton");

                setWidth(80);
                setShowFocused(false);
                setShowDown(false);
                setCanHover(true);
               
                setPrompt("Reload list");
                setTitle("Refresh");
                setHoverDelay(1);

                addHoverHandler(new ReloadImgButtonHoverHandler());
                addMouseOutHandler(new ReloadImgButtonMouseOutHandler());
        }
       
        private class ReloadImgButtonHoverHandler implements HoverHandler {
                @Override
                public void onHover(HoverEvent event) {
                        setIcon("[SKINIMG]action-icon_28px/refresh-white.png");
                };
        }

        private class ReloadImgButtonMouseOutHandler implements MouseOutHandler {
                @Override
                public void onMouseOut(MouseOutEvent event) {
                        setIcon("[SKINIMG]action-icon_28px/refresh-color.png");                       
                }
        }
}

This works fine. If you set the delay with to 0 with setHoverDelay(0), the hover-effect isn't executed anymore. I can live with a delay of 1, but I think this is a bug.
As note: In the server logs I see that the hover-image is requested, but it is not displayed.

Can you reproduce?

Best regards,
Blama

Viewing all articles
Browse latest Browse all 4756

Trending Articles