0

left and right event handler

Hello all,

I have a problem , how can i use event handler left and right opreration on a button.

Regards,

Sushma.S

by
2 Replies
  • A button fires an onNavigate event when the left, right, up and down arrows are pressed, so listen to this event as follows:

    CODE
    var btn = new KONtx.control.Buttton({
    events: {
    onNavigate: this._handleNavEvent.bindTo(this)
    }
    }).appendTo( this.container );


    Then in the event handler, check the event for the direction you are interested in.

    CODE
    function _handleNavEvent(event) {
    switch (event.payload.direction) {
    case 'left':
    // do something
    break;
    case 'right':
    // do something else
    break;
    }
    }
    0
  • Id like my last button to catch right event and focus close button in bottom menu.
    What is id of that red button?
    0

Recent Posts

in Getting Started / Beginners - Yahoo! TV Widgets