Jul 31, 2013, 8:38 AM
[OPEN] [#310] Window.DefaultFocus problem
Could you explain how DefaultFocus is supposed to work? Documentation says ("The id of a button to focus when this window received the focus.")
This isn't working for me. See example.
Also, what is AutoFocus="true" supposed to do and how is it different?
This isn't working for me. See example.
Also, what is AutoFocus="true" supposed to do and how is it different?
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
}
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Test</title>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport ID="vp" runat="server" Layout="VBoxLayout">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:Window ID="Panel1" runat="server" Border="false" BodyBorder="0" BodyCls="BodyFrame" Layout="HBoxLayout" DefaultFocus="STitleE" Width="200">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:Container runat="server" Flex="1">
<Items>
<ext:Panel ID="Panel2" runat="server" Border="false" BodyBorder="0" MarginSpec="0 2px" Height="100" Frame="true">
<Items>
<ext:Label runat="server" Html="Test" Height="100" />
<ext:TextField ID="STitleE" runat="server" MaxLengthText="12" MaxLength="12" Width="94" EnforceMaxLength="true"
MinLength="2" AllowBlank="false" CausesValidation="true" AutoFocus="true" />
</Items>
</ext:Panel>
</Items>
</ext:Container>
</Items>
</ext:Window>
</Items>
</ext:Viewport>
</form>
</body>
</html>
Last edited by Daniil; Aug 02, 2013 at 4:52 AM.
Reason: [OPEN] [#310]