View Full Version : Add items to window after loading

3 Jul 2009, 5:27 AM

I've n window where I try to insert symbols (I want to rebuild a window in an group box manner).
Thats the working window code:
winHandler = new Ext.Window({
id : 'group-' + iconTag,
width : 640,
height : 480,
plain : true,
title : iconText,
maximizable : true,
minimizable : true,
layout : 'border',
defaults : {
collapsible: false,
split: false
items: [{
title: 'a',
id: 'groupinfo-' + iconTag,
region: 'south',
border: false,
height: 75,
minSize: 75,
maxSize: 75,
cmargins: '5 0 0 0'
title: 'b',
id: 'grouplist-' + iconTag,
region: 'center',
border: false,
margins: '5 0 0 0',
items: [{
tag: 'div',
html: 'a'
tag: 'div',
html: 'b'
winHandler.show(Ext.get('shortcut-' + iconTag));
Now, here I try to add an symbol:
tag: 'div',
cls: 'win-shortcut',
id: 'groupshortcut-' + iconTag,
children: [{
tag: 'a',
href: '#',
children: [{
tag: 'img',
src: './assets/images/modules/'+ iconImage +'.png'
tag: 'br'
tag: 'span',
html: iconText
parentWindow is the id of the grouplist field. The problem is now, that the icons are set on the wrong position (see Image). What I do wrong? The should placed inside the panel b.

3 Jul 2009, 5:44 AM
What are the parameters to DomHelper.append? What does it DO?

Also, what do the BorderLayout docs say in bold at the top?

3 Jul 2009, 6:08 AM
Okay ... first some explantions for the variables:

parentWindow = 'grouplist-' + iconTag
iconTag = some value ... let us take 'test'. This value can set in on every person where the variable iconTag is used.
iconText = some text ... take 'Hello World'

borderLayout: Okay, you're right:
The regions of a BorderLayout are fixed at render time and thereafter, no regions may be removed or added. The BorderLayout must have a center region, which will always fill the remaining space not used by the other regions in the layout.But how I can create two areas in the window? The one area should take space on the bottom and should have an specified height, the second one should take the hole space which is available. The second should also be the area where I can store my divs. I want an window - comparable with the screen which can be seen on http://www.id.ethz.ch/services/list/webhosting/WebDAV_Windows-Vista_7?hires. I want the info area on the bottom, on the top the part where I can draw/insert my icons.

The domHelper part should help me, filling the area with content after creating ...

3 Jul 2009, 6:22 AM
You already have what you want. A "south" which is fixed height, and a "center" which takes up what's left.

What more do you need to do?

3 Jul 2009, 11:25 AM
I need a way, configure the south region as normal scrollable field where I can insert divs which represent icons. Currently I fail because the divs are drawn outside ...

3 Jul 2009, 11:34 PM
It sounds like your south region should be a DataView

or, if you need a title, a layout: 'fit' Panel which contains a DataView

6 Jul 2009, 12:07 AM
Okay ... you're right! I see only the wood but not the trees ... that was the right hint for me and now I've want I want.