A Fit layout
can be very useful to fit an item into all the available space of its container (for example a Viewport or a Window, or another Panel). In this example, a
Window is given a Fit layout so that the Panel takes up the full space of the
<ext:Window runat="server" Layout="Fit" Width="200" Height="200"> <Items> <ext:Panel Title="Fitted panel" AutoScroll="true" Border="false"> <BottomBar> <ext:StatusBar> <Items> <ext:Button Text="Click Me!" /> </Items> </ext:StatusBar> </BottomBar> </ext:Panel> </Items> </ext:Window>
When rendered, it will look like this:
The bottom bar has been added just for demonstration purposes. If ...