i can add event click and dblclick to ext:label?

  1. #1

    i can add event click and dblclick to ext:label?

    i look this post http://forums.ext.net/showthread.php...el-click-event about add event to FielLabel and write my code for ext:label:
     var onAfterRenderLabel = function (lbl) {
               
                var label = lbl;
                label.on("click", function () {
                    console.log('click', this);
                    alert(this.text);
                },
                lbl);
                console.log(lbl);
    
    
    
            }; 
    
    <ext:Label ID="lb1r" runat="server" Html="" Cls="ellipsis" >
                                        <Listeners>
                                                     <AfterRender Fn="onAfterRenderLabel" />
                                         </Listeners>
                                          </ext:Label>
    but event not fire ...
    please help me..
    thanks..

    ps. example from link post - not fire too..
    Last edited by asics167; Nov 28, 2013 at 5:26 AM.
  2. #2
    this work for me:
    label.getEl().on("click", function () {
    only add .getEl()

Similar Threads

  1. Replies: 5
    Last Post: Jul 18, 2013, 3:08 PM
  2. [CLOSED] NumberField: track dblClick event
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 16, 2010, 3:04 PM
  3. [CLOSED] Tree doubleclick (dblclick) event does not fire
    By jchau in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 01, 2010, 4:56 PM
  4. Replies: 2
    Last Post: Jun 01, 2009, 10:45 AM
  5. [CLOSED] Click AjaxEvent for Label
    By methode in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Dec 09, 2008, 4:49 AM

Posting Permissions