Mar 29, 2012, 11:09 PM
[CLOSED] Show Desktop window maximized - strange behavior
Hi.
I am trying to show a Desktop window maximized initially when shown.
I saw this thread: http://forums.ext.net/showthread.php...ndow-maximized
and based on this, I added my 'Show window' function the parameter mMaxi that when given an 'M' will call maximize() method after showing it.
The problem is that this produces strange behavior. The window shows maximized, but without the minimize button. Only shows the colse and restore button. If restore is clicked, the window virtually dissapears and only a small square with window title, close and maximize buttons are shown in the middle of the screen.
I paste the code and both images (maximized and restored window)
Function to open windows:
Window maximized initially (without minimize button):
Window restored??:
Thanks
Regards
Fernando
I am trying to show a Desktop window maximized initially when shown.
I saw this thread: http://forums.ext.net/showthread.php...ndow-maximized
and based on this, I added my 'Show window' function the parameter mMaxi that when given an 'M' will call maximize() method after showing it.
The problem is that this produces strange behavior. The window shows maximized, but without the minimize button. Only shows the colse and restore button. If restore is clicked, the window virtually dissapears and only a small square with window title, close and maximize buttons are shown in the middle of the screen.
I paste the code and both images (maximized and restored window)
Function to open windows:
//Parameters: (URL, Title, Position, Height, Width, Modal?, Maximized?)
function abrirVentanaDesktop(pURL, pTitulo, pPos, pAlto, pAncho, pModal, pMaxi)
{
var mWin = Ext.getCmp(pURL);
if (!mWin)
{
var desk = obtenerDesktopBase(); //Method to get Desktop from anywhere (Window in a Window, in a iframe... modal or not)
if (desk != undefined && desk !=null)
{
var mAncho;
var mAlto;
var mTitulo;
if(pAncho == undefined)
{
mAncho = 1000;
}
else
{
mAncho = pAncho;
}
if(pAlto == undefined)
{
mAlto = 600;
}
else
{
mAlto = pAlto;
}
if(pTitulo == undefined)
{
mTitulo = '';
}
else
{
mTitulo = pTitulo;
}
if(pModal == undefined || pModal == null)
pModal = false;
else
pModal = true;
mWin = desk.createWindow({
id: pURL,
title : mTitulo,
width : mAncho,
height : mAlto,
maximizable : true,
minimizable : true,
modal: pModal,
closeAction : "close",
loadAction: function(){if(evaluarSessionExpired(this.document.innerHTML)){refrescarVentanaBase();return;}},
autoLoad : {
url : pURL,
mode : "iframe",
showMask : true
}
});
if(pPos == 'center')
mWin.center();
}
mWin.show();
if (pMaxi == 'M') // ADDED CONTROL TO MAXIMIZE WINDOW IF NEEDED
{
mWin.maximize();
}
}
}
Call from a Menu:<ext:MenuItem runat="server" ID="MenuItem2" Text="Categorías de contacto" HideOnClick="true" Icon="WorldEdit">
<Listeners >
<Click Handler="abrirVentanaDesktop('./CategoriaContactoListado.aspx', 'Categorías de contacto', 'center',null,null,false,'M');"/>
</Listeners>
</ext:MenuItem>
Window maximized initially (without minimize button):
Window restored??:
Thanks
Regards
Fernando
Last edited by Daniil; Apr 03, 2012 at 5:59 PM.
Reason: [CLOSED]