View Full Version : [CLOSED][3.0RC2] Problem with PagingToolbar.add* functions

17 Jun 2009, 9:13 PM
I'm using Linux Firefox 3.0.4

If I go to my local examples in ext 2.2 examples/grid/paging.html, then after the grid is rendered I try this code and it works fine:

If I go to my local examples in ext 3.0 RC2 and do the same exact thing, it doesn't work :(

Is this a bug or is there a different way to add items to the toolbar?


17 Jun 2009, 9:22 PM
Toolbar is a Container. When you are done adding items you need to call doLayout();

I tested your code and added doLayout(); with the version in svn and this worked fine.

I'm going to update the status of this thread to CLOSED, please let me know if I misunderstood your concern.

17 Jun 2009, 10:21 PM
Thanks, that's one thing solved! In Ext 2.2, Toolbar isn't a container and you don't need to use doLayout().

There still is a small difference. In Ext 2.2 when you do .addText() it adds it to the right of the "Show Preview" button in the example. In Ext 3.0 RC2 when you do .addText() it gets added to the right of "Displaying topics 1 - 25 of 55808".

What would be the preferred method to use .addText() to insert an item to the right of "Show Preview" in Ext 3?

Thanks for your help

17 Jun 2009, 10:36 PM
PagingToolbar also changed: The displayInfo is now a proper textitem part of the toolbar.

You should insert your text at the proper index, e.g.

grid.getBottomToolbar().insert(11, new Ext.Toolbar.TextItem('hi'));
(index = 11 if I counted correctly...)