PDA

View Full Version : [CLOSED] window cannot be resized



jstifel
May 12, 2015, 10:41 AM
I am trying to create and resize a window on page_load without any success. What I want is to be able to create and change window size on callback.
What Am I doing wrong?



<%@ Page Language="VB" %>

<!DOCTYPE html>

<script runat="server">

Dim _win As Ext.Net.Window
Protected Sub Page_Load(sender As Object, e As EventArgs)
_win = New Ext.Net.Window
_win.ID = "w1"
_win.Title = "Window 1"
_win.Height = Unit.Pixel(t1.Value)
_win.Width = Unit.Pixel(t2.Value)
' _win.SetSize(t1.Text, t2.Text)
Me.Controls.Add(_win)
_win.Center()
_win.Hidden = True
End Sub

Protected Sub BtnClick(sender As Object, e As DirectEventArgs)
_win.Show()
End Sub


</script>

<script type="text/javascript">

</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<extnet:ResourceManager ID="resourceManager" runat="server" />
<extnet:formPanel runat="server" Layout="FormLayout">
<Items>
<extnet:NumberField runat="server" ID="t1" Text="200" AllowDecimals="False" AllowBlank="False" AllowExponential="False" MinValue="1" MaxValue="1000" FieldLabel="Height"/>
<extnet:NumberField runat="server" ID="t2" Text="200" AllowDecimals="False" AllowBlank="False" AllowExponential="False" MinValue="1" MaxValue="1000" FieldLabel="Width"/>
</Items>
<Buttons>
<extnet:Button runat="server" text="Window show" >
<DirectEvents>
<Click OnEvent="BtnClick" />
</DirectEvents>
</extnet:Button>
</Buttons>
</extnet:formPanel>
</form>
</body>
</html>

Daniil
May 13, 2015, 8:19 AM
Hi @jstifel,

Please use a Window's Maximized property.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.window.Window-cfg-maximized