سؤال

I have a Ext Js panel and I want to get the Title of the panel for some purpose.

I have the id of the panel and I need to get the title of the panel from it.

I am looking for some thing like this

Ext.getCmp('myPanel').getTitle();

I am using Ext Js 3.4

هل كانت مفيدة؟

المحلول

Since no getTitle() method is defined for the component Ext.Panel, I would go for the property directly:

var myTitle = Ext.getCmp('myPanel').title;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top