Mar 18, 2011, 10:53 PM
[CLOSED] HBoxLayout not resizing according to window size
Hi,
I just created one panel, textfield and buttons in a panel with flexRatio. While loading all controls are showing in the form, but if I resize page all controls are not resizing automatically to fit in the resizable form. If refresh the page then those are resizing according to flexratio and showing up. Instead of that I need those controls should resize automatically. The same approach in normal table design like each td having width in % of total width, so the table resizes according to form. Is there any properties needs to change in HBOXLayout to support this and also all controls are not aligning properly in vertical direction.
I just created one panel, textfield and buttons in a panel with flexRatio. While loading all controls are showing in the form, but if I resize page all controls are not resizing automatically to fit in the resizable form. If refresh the page then those are resizing according to flexratio and showing up. Instead of that I need those controls should resize automatically. The same approach in normal table design like each td having width in % of total width, so the table resizes according to form. Is there any properties needs to change in HBOXLayout to support this and also all controls are not aligning properly in vertical direction.
<%@ Page Language="VB" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
'Button4.Hide()
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="resMngr" runat="server" />
<ext:Panel runat="server" ID="pnlFlexRatio" Height="35" Layout="HBoxLayout" AnchorHorizontal="100%">
<Defaults>
<ext:Parameter Name="margins" Value="0 5 0 0" Mode="Value" />
</Defaults>
<LayoutConfig>
<ext:HBoxLayoutConfig Padding="5" Align="Middle" />
</LayoutConfig>
<Items>
<ext:Panel ID="pnlCount" runat="server" Flex="1" Width="20" Height="25"></ext:Panel>
<ext:Button ID="Button2" runat="server" Text="Button 2" Flex="1" Height="20"/>
<ext:TextField ID="Button3" runat="server" Text="Button 3" Flex="3" Height="25"/>
<ext:Button ID="Button4" runat="server" Text="Button 4" Flex="1" Margins="0" Height="20"/>
</Items>
</ext:Panel>
</form>
</body>
</html>
Last edited by Daniil; Apr 01, 2011 at 12:28 PM.
Reason: [CLOSED]