4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
13 * @class Roo.menu.TextItem
14 * @extends Roo.menu.BaseItem
15 * Adds a static text string to a menu, usually used as either a heading or group separator.
17 * Creates a new TextItem
18 * @param {String} text The text to display
20 Roo.menu.TextItem = function(text){
22 Roo.menu.TextItem.superclass.constructor.call(this);
25 Roo.extend(Roo.menu.TextItem, Roo.menu.BaseItem, {
27 * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false)
31 * @cfg {String} itemCls The default CSS class to use for text items (defaults to "x-menu-text")
33 itemCls : "x-menu-text",
36 onRender : function(){
37 var s = document.createElement("span");
38 s.className = this.itemCls;
39 s.innerHTML = this.text;
41 Roo.menu.TextItem.superclass.onRender.apply(this, arguments);