-
6 Jul 2008 10:51 PM #1
[Solved] Problem displaying Window outside Form Panel
[Solved] Problem displaying Window outside Form Panel
Hi,
I have got a window which is rendered to Form Panel. I want to display it outside the Form Panel boundaries. I could display such Window but only if its not the part of (not rendered to) Form Panel. See the screen shot. Can anyone help ?
Thanks
-
6 Jul 2008 10:54 PM #2
Post your code.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
6 Jul 2008 11:13 PM #3
Hear is a sample code...
Hear is a sample code...
Hi,
Thanks for your early reply. Hear is the simplified code.
You can try this in firebug.Code:var theseSpecWindowConfig = ({ id: 'thesespecwindow', title: 'Choose your specialities', width: 340, autoHeight: true, closeAction: 'hide', plain: true, layout: 'fit', animateTarget: 'tspec', draggable: false, buttonAlign: 'center', resizable: false, items: [{ xtype: 'panel', baseCls: 'window-bg', bodyStyle: 'background:transparent; padding:5px;', border: true, id: 'thesespecpanel', layout: 'fit', autoHeight: true, //some form components inside this panel items:[{html:'item 1'},{ html:'item 2'},{html: 'item3'}] }], buttons: [{ text: 'Done', handler: function(){ Ext.getCmp('thesespecwindow').setVisible(false); } }] }); var theseSpecWindow ; searchtoobarpanel = new Ext.FormPanel({ renderTo: document.body, title: 'Search Jobs', id: 'searchtoolbarform', collapsible: true, width: 300, height: 100, layout: 'border', items: [{ region: "center", layout: 'fit', style: 'padding:5px 1px 5px 1px', tbar: ['<b>Search travel jobs for</b>', { text: '<b><u>these specialities</u></b>', id: 'tspec', onClick: function(){ //create these specaialty window if not created yet if (!theseSpecWindow) { theseSpecWindow = new Ext.Window(theseSpecWindowConfig); theseSpecWindow.render(Ext.getCmp('searchtoolbarform').getForm().getEl()); } //on click of these specialty link - hide window if already on display. show it if hidden. if (theseSpecWindow.isVisible()) { theseSpecWindow.hide(); } else { theseSpecWindow.setPosition(Ext.get('tspec').getX(), Ext.get('tspec').getY()); theseSpecWindow.show('tspec'); } } }] }] });
-
6 Jul 2008 11:16 PM #4
So... the question is, WHY are you rendering the window inside the form if you don't want it inside the form?
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
6 Jul 2008 11:21 PM #5
Its not as simple as it seems...
Its not as simple as it seems...
Hi,
Thanks again...
I have simplified the code. I am displaying a Grid below this Form Panel. I want to display the Window over the Grid.
-
6 Jul 2008 11:30 PM #6
Ok, well if you only give me half the information how am I supposed to help?
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
6 Jul 2008 11:38 PM #7
You are right. But is it possible ?
You are right. But is it possible ?
The question is "is it possible ?".
I am actually integration the components. Everything is done accept the fact that Window is not getting displayed as intended.
I have already wasted a day solving this...
-
6 Jul 2008 11:43 PM #8
Why are you using a window?
If you want to display something in the place of the grid, why not just hide the grid and put another panel (not window) in its place?Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
7 Jul 2008 12:01 AM #9
My problem is Form Panel not Grid !
My problem is Form Panel not Grid !
Please see the Screen shots. From the requirements I have, the window should be displayed outside the Form panel.
-
7 Jul 2008 12:06 AM #10
So render the window OUTSIDE the form and position it over the grid.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!


Reply With Quote