1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    129
    Answers
    1
    Vote Rating
    -3
    sudhirkd can only hope to improve

      0  

    Default Unanswered: Want to either add background color to Button or add tap event to Panel

    Unanswered: Want to either add background color to Button or add tap event to Panel


    Ideally I want to add tap event on Panel, but the event is not available. So I tried to use Button with "ui : plain", and style : background-color : #value, but background color is not working for button (the button changes size to normal size).Any solution for this problem ?

    Thanks.

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    Code:
    Ext.create('Ext.Panel',{
        listeners:{
            element:'element',
            tap:function(){
                var panel=this;
            }
        }
    })
    I write English by translator.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    129
    Answers
    1
    Vote Rating
    -3
    sudhirkd can only hope to improve

      0  

    Default


    Thanks For Reply. But following did not work for me. This code does not show alert clicking on the panel. The panel is part of caraousel.

    Code:
    {
                            xtype: 'panel',
                            listeners: '{ element:\'element\', tap:function(){ var panel=this; alert(1);} }',
                            html: 'Panel 1',
                            itemId: 'mypanel7',
                            style: 'background-color:LightGreen;',
                            layout: {
                                type: 'fit'
                            }
      }
    Please note that I am using Sencha Architect.

  4. #4
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    Why you add quotes to the code?
    Code:
    	{
                            xtype: 'panel',
                            listeners: { element:'element', tap:function(){ var panel=this; alert(1);} },//remove the quote
                            html: 'Panel 1',
                            itemId: 'mypanel7',
                            style: 'background-color:LightGreen;',
                            layout: {
                                type: 'fit'
                            }
      }
    I write English by translator.

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Posts
    129
    Answers
    1
    Vote Rating
    -3
    sudhirkd can only hope to improve

      0  

    Default


    I use sencha architect, it adds quotes automatically. Is my code working for you if you remove quotes ?

    Thanks for replying.

  6. #6
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    Yes,it works.You may try this to let sencha architect not auto add the quotes.
    Code:
    listeners: {
        tap: {
            element: 'element',
            fn: function() {
                var panel = this;
                alert(1);
            }
        }
    }
    I write English by translator.

  7. #7
    Sencha User
    Join Date
    Sep 2011
    Posts
    129
    Answers
    1
    Vote Rating
    -3
    sudhirkd can only hope to improve

      0  

    Default


    Great ! It worked. Thank you very much !

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar