PDA

View Full Version : FillToolItem and a browser resize



andrynn
24 Mar 2014, 12:19 AM
Hi,

I'm trying to create a toolbar where I have a couple of buttons aligned to the left and one button (menu) aligned to the right. I'm using a FillToolItem to fill the space between the left buttons and the right button. When the application first starts everything looks as you'd expect, but when the browser is resized the position of the right button isn't changed (seems like the FillToolItem doesn't changes its size).

Is this supposed to work? Below is a simple example of the view I'm using. It will be added to a ViewPort.



<c:NorthSouthContainer>
<c:north>
<toolbar:ToolBar>
<button:TextButton text="LeftButton"/>
<toolbar:FillToolItem/>
<button:TextButton text="Right button">
<button:menu>
<menu:Menu ui:field="splitButtonMenu">
<menu:MenuItem HTML="Sub 1" />
<menu:MenuItem HTML="Sub 2" />
</menu:Menu>
</button:menu>
</button:TextButton>
</toolbar:ToolBar>
</c:north>
<c:south>
<gxt:ContentPanel headingText="Heading text">

</gxt:ContentPanel>
</c:south>
</c:NorthSouthContainer>

andrynn
24 Mar 2014, 12:24 AM
I can answer my own question. I just double-checked the Java part of the view and could see that it did extend Composite, but I had imported GWT's Composite and not Sencha Composite. When changing to Sencha Composite the right button moves when the browser is resized.