Results 1 to 4 of 4

Thread: Trigger on mouse over/hover in Combobox

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Location
    India
    Posts
    87
    Vote Rating
    0
      0  

    Default Unanswered: Trigger on mouse over/hover in Combobox

    Hi,
    I have set the hideTrigger property of combo box to true. Now, the trigger doesn't show up. How can I bring down the list on hover event, instead of the default click event.?
    Thanks,
    Ronz

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Answers
    501
    Vote Rating
    249
      0  

    Default

    Code:
    hideTrigger: true,
    listeners: {
        afterrender: function () {
          var me = this;
            me.el.on('mouseover', function () {
              me.expand();
            }, me);
        }
    }

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Location
    India
    Posts
    87
    Vote Rating
    0
      0  

    Default

    Thanks. It worked.
    I would like to have a mouse out event, when user does the mouse out event, on the combobox list i.e. moves the mouse out of the combobox value list, the combobox list should collapse. Any help
    Thanks,
    Ronz

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Answers
    501
    Vote Rating
    249
      0  

    Default

    monitorMouseLeave should do the trick. the first param is how many milliseconds to wait before taking action.
    http://docs.sencha.com/ext-js/4-1/#!...itorMouseLeave


    Code:
    hideTrigger: true,
    listeners: {
        afterrender: function (combo) {
            combo.el.on('mouseover', function () {
              combo.expand();
            }, combo);
        }
        , expand: function (combo) {
            combo.mouseLeaveMonitor = combo.getPicker().el.monitorMouseLeave(500, combo.collapse, combo);
        }
        , destroy: function (combo) {
            combo.getPicker().el.un(combo.mouseLeaveMonitor);
        }
        , single: true
    }

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •