Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    95
    Answers
    3
    Vote Rating
    1
    Albareto is on a distinguished road

      0  

    Default Answered: What's the correct way to get the buttons from an Ext.window.Window?

    Answered: What's the correct way to get the buttons from an Ext.window.Window?


    Hi there,

    I have a Window, something like this:

    Code:
    var buttons = getButtons(),
        w = Ext.create('Ext.window.Window',
        {
             //config here...
            buttons : buttons
        });
    Then in an event I want to iterate over this buttons, I get the window there but how to get the buttons?

    I have seen that I can get the docked elements and from there the array of buttons, this is a bit overkilling in my opinion, I mean, the code would be like:

    Code:
    var buttons = [];
    Ext.Array.each(myWindow.getDockedElements(), function(de)
    {
        if (is in the bottom)
        {
              //check if it has buttons, if so then store them in the array
        }
    });
    In Ext 3.X there was a method in the window that returned the buttons, any idea how to get them now?

    Thanks!

  2. 1 - Give an itemId to your window:
    PHP Code:
    Ext.create('Ext.window.Window',{
       
    itemId'mywindow',
       ...
    }); 
    2- Do whatever you need to do to generate the buttons

    3 - Use Ext.ComponentQuery.query to retrieve the buttons from the window:
    If the buttons are in a toolbar, you can use:
    PHP Code:
    Ext.ComponentQuery.query('myWindow toolbar button'); 
    The code above will return an array of all buttons that are inside a toolbar in your window.

Thread Participants: 3

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi