beforeHoverEffect on Group

Post bugs here!
joedarock
Posts: 169
Joined: Thu Nov 19, 2015 8:39 pm

beforeHoverEffect on Group

Post by joedarock »

The beforeHoverEffect event doesn't appear to fire for a Group control. It does work on other elements.

Advice?

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: beforeHoverEffect on Group

Post by support »

This is because the Group control does not have hover effection.
If you want make it, you can give it hover event handler:
   
Class('App', 'xui.Com',{
    Instance:{
        iniComponents : function(){
            // [[Code created by CrossUI RAD Studio
            var host=this, children=[], append=function(child){children.push(child.get(0));};
            
            append(
                xui.create("xui.UI.Group")
                .setHost(host,"xui_ui_group1")
                .setLeft(180)
                .setTop(30)
                .setWidth(100)
                .setHeight(100)
                .setCaption("xui_ui_group1")
                .setToggleBtn(false)
                .onRender("_xui_ui_group1_onrender")
                .beforeHoverEffect("_xui_ui_group1_beforehovereffect")
            );
            
            return children;
            // ]]Code created by CrossUI RAD Studio
        },
        _xui_ui_group1_beforehovereffect:function (profile, item, e, src, type){
            console.log(type);
        },
        _xui_ui_group1_onrender:function (profile){
            profile.getRoot().onMouseover(function(){}).onMouseout(function(){});
        }
    }
});
Class('App', 'xui.Com',{
    Instance:{
        iniComponents : function(){
            // [[Code created by CrossUI RAD Studio
            var host=this, children=[], append=function(child){children.push(child.get(0));};
            
            append(
                xui.create("xui.UI.Group")
                .setHost(host,"xui_ui_group1")
                .setLeft(180)
                .setTop(30)
                .setWidth(100)
                .setHeight(100)
                .setCaption("xui_ui_group1")
                .setToggleBtn(false)
                .onRender("_xui_ui_group1_onrender")
                .beforeHoverEffect("_xui_ui_group1_beforehovereffect")
            );
            
            return children;
            // ]]Code created by CrossUI RAD Studio
        },
        _xui_ui_group1_beforehovereffect:function (profile, item, e, src, type){
            console.log(type);
        },
        _xui_ui_group1_onrender:function (profile){
            profile.getRoot().onMouseover(function(){}).onMouseout(function(){});
        }
    }
});
   

joedarock
Posts: 169
Joined: Thu Nov 19, 2015 8:39 pm

Re: beforeHoverEffect on Group

Post by joedarock »

Thanks. I will try this and report.

joedarock
Posts: 169
Joined: Thu Nov 19, 2015 8:39 pm

Re: beforeHoverEffect on Group

Post by joedarock »

OK, I tried this.

The onRender event fires properly every time the group is loaded/reloaded. The beforehovereffect event still doesn't fire.

BTW, tooltips don't work on this control either.

joedarock
Posts: 169
Joined: Thu Nov 19, 2015 8:39 pm

Re: beforeHoverEffect on Group

Post by joedarock »

Is there anymore you can add to why the mousehover and tooltips don't work on this control?

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: beforeHoverEffect on Group

Post by support »


joedarock
Posts: 169
Joined: Thu Nov 19, 2015 8:39 pm

Re: beforeHoverEffect on Group

Post by joedarock »

There are a bunch of files there. Do I need all of them? Where should I put them or, in other words, how do I do the update?

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: beforeHoverEffect on Group

Post by support »

We will lauch 1.4 before July.

Or, you can try this way:
   
Class('App', 'xui.Com',{
    Instance:{
        iniComponents : function(){
            // [[Code created by CrossUI RAD Studio
            var host=this, children=[], append=function(child){children.push(child.get(0));};
            
            append(
                (new xui.UI.Group())
                .setHost(host,"ctl_group1")
                .setLeft(270)
                .setTop(60)
                .setWidth(290)
                .setHeight(100)
                .setCaption("ctl_group1")
                .setToggleBtn(false)
                .beforeHoverEffect("_ctl_group1_beforehovereffect")
            );
            
            return children;
            // ]]Code created by CrossUI RAD Studio
        },
        events:{
            "onReady" : "_com_onready"
        },
        _com_onready:function (com, threadid){
            // You have to run this before the control was renderered
            xui.UI.Group.setBehavior({HoverEffected:{"KEY":"KEY"}});
        },
        _ctl_group1_beforehovereffect:function (profile, item, e, src, type){
            xui.message(type);
        }
    }
});
Class('App', 'xui.Com',{
    Instance:{
        iniComponents : function(){
            // [[Code created by CrossUI RAD Studio
            var host=this, children=[], append=function(child){children.push(child.get(0));};
            
            append(
                (new xui.UI.Group())
                .setHost(host,"ctl_group1")
                .setLeft(270)
                .setTop(60)
                .setWidth(290)
                .setHeight(100)
                .setCaption("ctl_group1")
                .setToggleBtn(false)
                .beforeHoverEffect("_ctl_group1_beforehovereffect")
            );
            
            return children;
            // ]]Code created by CrossUI RAD Studio
        },
        events:{
            "onReady" : "_com_onready"
        },
        _com_onready:function (com, threadid){
            // You have to run this before the control was renderered
            xui.UI.Group.setBehavior({HoverEffected:{"KEY":"KEY"}});
        },
        _ctl_group1_beforehovereffect:function (profile, item, e, src, type){
            xui.message(type);
        }
    }
});
   

joedarock
Posts: 169
Joined: Thu Nov 19, 2015 8:39 pm

Re: beforeHoverEffect on Group

Post by joedarock »

Did you launch 1.4 yet?

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: beforeHoverEffect on Group

Post by support »


Post Reply