PDA

View Full Version : desktop problem please help



p_leon
4 Dec 2009, 10:56 AM
Hi, :((

my name is Pedro Leon, and i have this problem:

i'm working with desktop example, this example has two icons on desktop, when i click one of these icons, a window appear and it brings some information, now i need to made other icon in the desktop.

i was searching and i now that this peace of code draws me the new icon with a diferent id than the others.

<dt id="example-win-shortcut">
<a href="#"><img src="images/s.gif" />
<div>EXAMPLE</div></a>
</dt>

but if i click this icon he doen`t do nothing. what code i have to use to made that posible?

the others <dt> like this:

<dt id="grid-win-shortcut">
<a href="#"><img src="images/s.gif" />
<div>Grid Window</div></a>
</dt>

have this code that build window with html inside:

MyDesktop.GridWindow = Ext.extend(Ext.app.Module, {
id:'grid-win',
init : function(){
this.launcher = {
text: 'Empresa',
iconCls:'icon-grid',
handler : this.createWindow,
scope: this
}
},
createWindow : function(){
var desktop = this.app.getDesktop();
var win = desktop.getWindow('grid-win');
if(!win){
win = desktop.createWindow({
id: 'grid-win',
title:'Empresa',
width:740,
height:480,
iconCls: 'icon-grid',
shim:false,
animCollapse:false,
constrainHeader:true,
html : 'text'
});
}
win.show();
}
});

but i don't now how to appear another window with other <dt>

please help me

thanks.