PDA

View Full Version : Adding Buttons to PagingToolBar



sunshinerain
3 Jul 2009, 6:44 AM
How do I add buttons to the middle of PagingToolBar in 2.x?
After porting my code from V1 to V2, my buttons are now all the
way to the right, right of the "Displaying x of x" label.

Thanks,
Robbie

mabco
24 Sep 2009, 10:46 AM
Would like to know the answer to this one as well. Thanks.

arkadye
24 Sep 2009, 2:30 PM
By invoking pagingToolbar.setAlignment(HorizontalAlignment.LEFT) you can align your buttons to the left. If you pass HorizontalAlignment.CENTER, they will be centered.

Hope it helps.

sunshinerain
29 Sep 2009, 6:28 AM
I just tried this. It doesn't work for me. It does center the buttons, but
my buttons are still to the right of the PagingToolbarBar.

Prior to 2.0, my buttons were inserted between the Refresh button
and the "Displaying X of X" label.

d95sld95
6 Oct 2009, 5:00 PM
I created this plugin. Maybe it can help you positioning your buttons. Look at around this line in the code:


this.toolbar.insert(comboBox, position);


http://www.extjs.com/forum/showthread.php?t=81975&highlight=PagingToolbar

sunshinerain
7 Oct 2009, 6:00 AM
Awesome! Thanks. That worked. Using "insert(x,pos)" rather than "add(x)" positioned my items
correctly. Start pos is currently 11.