PDA

View Full Version : can not extend TabItem for contextmenu



bhomass
26 Apr 2009, 7:16 PM
why is so much of the widgets locked away in package protection?

I want to apply context menu to TabItem's header. the Component.setContextMenu() method is a protected method, so I subclassed TabItem. but HeaderItem is an inner class. I am not able to subclass that or even access the header variable, because it is package protected.

I tried rewrite the entire TabItem, but can not do that because it uses TabPanel as a package protected variable, so I can not recreate TabItem outside the package.

basically, it means no one can add context menu outside of grid, table, tree, and datalist.

any one have any suggestions for adding context menu to the tab item?

Martin.Trummer
27 Apr 2009, 1:46 AM
GXT 2.0 has this feature: http://extjs.com/examples-dev/explorer.html#advancedtabs

darrellmeyer
29 Apr 2009, 10:20 AM
Component setContextMenu visibility has been changed to public. The package members have been changed to protected in TabItem. Changes are in SVN.