Results 1 to 3 of 3

Thread: Question on plugins

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    195

    Default Question on plugins

    I'm trying to do tab scroller menu with Ext Designer using Jay's example from: http://tdg-i.com/59/how-to-add-a-tab-scroller-menu

    In Jay's example, there's some code which looks like:
    Code:
    items  : {
    	        xtype           : 'tabpanel',
    		activeTab       : 0,
    		id              : 'myTPanel',
    		enableTabScroll : true,
    		resizeTabs      : true,
    		minTabWidth     : 75,
    		plugins         : [ scrollerMenu ],
    		items           : [
    			{
    				title : 'our first tab'
    			}
    		]
    	}
    Since I cannot set the "plugins" in Ext Designer, then I wanted to work around by writing some code like this:

    Code:
    var scrollerMenu = new Ext.plugins.TDGi.tabScrollerMenu({
    			maxText : 15,
    			pageSize : 5
    		});
    
    		this.tabs.plugins = [ scrollerMenu ];
    this.tabs is where my autoRef points to. But seems it does not work.

    I'm quite new to Extjs and even OO javascript. Any help would be greatly appreciated!

  2. #2
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    Hi elgs,

    You can see this thread post for the answer: http://www.sencha.com/forum/showthre...440#post485440 You are very close, you simply need to call initPlugin on the plugin instance so the tabs instance will realize it has the plugin.

    Code:
    this.tabs.plugins = [ this.tabs.initPlugin(scrollerMenu) ];
    Hope that helps!

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    195

    Default

    Hi Jarrednicholls,

    You rock!! Your code works like a charm! Thanks a lot. The forum is really useful for newbies like me!

    Best regards,
    Elgs

Similar Threads

  1. HtmlEditor after all plugins
    By vizcano in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 18 Dec 2009, 4:18 AM
  2. Plugins vs extension
    By pokerking400 in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 7 May 2008, 12:37 PM
  3. [2.0??] Grid with two plugins
    By aymen00007 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 15 Feb 2008, 9:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •