Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 09:54:41 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: how to add event to cmdbtns  (Read 1106 times)
17ext
Newbie
*
Posts: 3


View Profile
« on: February 02, 2009, 06:01:06 AM »

I came across sigma builder yesterday and tried it. It is really very nice and powerful.
But when it comes to cmdbtns, I can't find a place to add event handler. For example, ok/cancel button of colorpicker, how to add events for these two ones?
I can't find it in API documentation, either. Sad
Logged
jjhon
Newbie
*
Posts: 1


View Profile WWW
« Reply #1 on: May 22, 2011, 01:09:14 PM »

I have the same question. Did someone found anything?
Logged

linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #2 on: May 22, 2011, 06:07:16 PM »

Class('App', 'linb.Com',{
    Instance:{
        iniComponents : function(){
            // [[code created by jsLinb UI Builder
            var host=this, children=[], append=function(child){children.push(child.get(0))};
           
            append(
                (new linb.UI.ColorPicker)
                .setHost(host,"ctl_colorpicker1")
                .setLeft(230)
                .setTop(170)
                .setAdvance(true)
                .beforeUIValueSet("_ctl_colorpicker1_beforeuivalueset")
                .onRender("_ctl_colorpicker1_onrender")
                .beforeClose("_ctl_colorpicker1_beforeclose")
            );
           
            return children;
            // ]]code created by jsLinb UI Builder
        },
        _ctl_colorpicker1_beforeclose : function (profile, src) {
            alert('for cancel event');
            // return false to stop this event
        },
        _ctl_colorpicker1_beforeuivalueset : function (profile, oldValue, newValue) {
            alert('before value changed');
            // return false to stop this event
        },
        _ctl_colorpicker1_onrender : function (profile) {
            profile.getSubNode("SET").onClick(function(){
                alert('custom event');
            });
        }
    }
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!