PDA

View Full Version : PagingToolbar spacing for Right menu item



cwolcott
Mar 19, 2012, 10:47 PM
In v1.2 the spacing between the PagingToolbar DisplayMsg and the right menu item was spaced properly, but in v2.0 there is extra space.



<BottomBar>
<ext:PagingToolbar ID="ActiveUserPaging" runat="server" DisplayInfo="true" DisplayMsg="Displaying active users {0} - {1} of {2}"
EmptyMsg="No active users to display">
<Items>
<ext:ToolbarFill />
<ext:Button runat="server" Icon="Help" ToolTip="Help" />
</Items>
</ext:PagingToolbar>
</BottomBar>


w/ DisplayInfo="false", position properly.
3965

w/ DisplayInfo="true", to much spacing
3966

* Built against revision 3893

Daniil
Mar 20, 2012, 6:54 PM
Hi,

There is

if (me.displayInfo) {
me.items.push('->');
me.items.push({xtype: 'tbtext', itemId: 'displayItem'});
}
within the initComponent method of the PagingToolbar class.

'->' means a ToolbarFill component.

So, the button is between two ToolbarFill components and it's center aligned.

I can suggest the following solution - remove the ToolbarFill between the button and info field.

Example

<ext:PagingToolbar
runat="server"
DisplayInfo="true"
DisplayMsg="Displaying active users {0} - {1} of {2}"
EmptyMsg="No active users to display">
<Items>
<ext:ToolbarFill />
<ext:Button runat="server" Icon="Help" ToolTip="Help" />
</Items>
<Listeners>
<BeforeRender Handler="this.items.removeAt(this.items.length - 2);" />
</Listeners>
</ext:PagingToolbar>