1
votes

I have a Panel where items are List and two Toolbars are in dockedItems. One Toolbar is hidden by default other is visible. When I click one Toolbar it gets hidden and other visible ( using setVisible function ) The problem is that I can't see the active one until I resize a window. Maybe some one knows how could I repaint it or refresh? ( tried Ext.repaint(), didn't help )

Thanks

2

2 Answers

1
votes

Try calling doComponentLayout() and doLayout() on the panel object.

1
votes

Most likely you will want to use the doLayout() since doComponentLayout() will also try doing all of the child components and in some applications especially where there are a lot of components, weird things would happen with doComponentLayout() i.e. information going missing, bottom toolbars going to the top, extra whitespace around edges. This was experienced in Sencha Touch 1 hence i would definitely use the doLayout() on the component or you can add a listener to the toolbar and when show event is fired you can call doLayout on it and if that does not work call it on the parent of the toolbar and that should work.