Morteza Malvandi
Morteza Malvandi

Reputation: 1724

Suitable component query for tbar of a panel in Extjs

I have a panel and in top bar of this panel I have some buttons.
I select the button below:

mypanel button[action=draw]

But I want to select the button from tbar of panel.
How do I do that?

Upvotes: 0

Views: 428

Answers (1)

Lorenz Meyer
Lorenz Meyer

Reputation: 19945

It's really difficult to understand what you ask. The selector looks fine. It selects a button with action 'draw' inside the panel, it can be inside the tbar or not.

If you have two button[action=draw] inside the panel, you can select the one in tbar with mypanel toolbar button[action=draw].

If you have a reference of the toolbar in a variable, do it like this : tbar.down('button[action=draw]')

Upvotes: 2

Related Questions