PDA

View Full Version : [CLOSED] Enable resize of a panel in Client side



xeo4.it
May 28, 2013, 10:25 AM
Hi,
I don't succeed to enable the resize of a panel in Client side code.
See my example.
Thank you

Jimmy



<%@ Page Language="C#" %>


<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>


<!DOCTYPE html>


<html>
<head id="Head1" runat="server">
<title></title>


<script type="text/javascript">


var btnEnableResizeClick = function () {


App.testResize.resizable = true;
App.testResize.maxWidth = 1000;
App.testResize.maxHeight = 1000;
App.testResize.doLayout();


}


</script>

</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />

<ext:Button
ID="btnEnableResize"
runat="server"
Text="Enable resize">
<Listeners>
<Click Handler="btnEnableResizeClick();" />
</Listeners>


</ext:Button>




<ext:Panel
ID="testResize"
runat="server"
Width="300"
Height="300"
Resizable="false"
>


</ext:Panel>

</form>
</body>
</html>

Daniil
May 28, 2013, 12:28 PM
Hi Jimmy,

I would try to call a Panel's initResizable method.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.panel.Panel-method-initResizable

xeo4.it
May 31, 2013, 9:25 AM
Hi Daniil,
it works fine.
Thank you

Jimmy