|
|||||||
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
Hi huys,
I'm trying to fit a textArea under a dataview all nested in a tabPanel. ![]() so I have 4 elements like that : var tabs = new Ext.TabPanel({
id:'tabPanel',
height:515,
width:284,
items:[ {xtype:'panel', id:'todayTab', layout:'border',border:false, title: 'Today',
items:[{xtype:'panel',id:'dataview',region:'north',items:[testView]}
,{xtype:'panel',layout:'fit',region :'center',items:[{xtype:'textarea',id: 'today'}]}
]},
If the dataView is empty, the textArea should fill all the space. I tried with a north region but I have to specify the height to make it work and It must be set automatically... Please find in attachement what it looks like before removing an item from the dataView.. Thanks very much for your help. T. |
|
#2
|
||||
|
||||
|
Format your code. It's unreadable.
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them. ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu Read the docs too: http://extjs.com/deploy/dev/docs/ See Saki's samples: http://examples.extjs.eu/ Build your own Ext: http://extjs.com/products/extjs/build/ Scope: http://extjs.com/forum/showthread.ph...642#post257642 |
|
#3
|
|||
|
|||
|
|
|
#4
|
|||
|
|||
|
Sorry for the code...
var tabs = new Ext.TabPanel({
id: 'tabPanel',
height: 515,
width: 284,
border: false,
activeTab: 0,
items: [{
xtype: 'panel',
id: 'todayTab',
layout: 'border',
border: false,
title: 'Today',
items: [{
xtype: 'panel',
id: 'test',
//height: 70,
region: 'north',
items: [dataView]
},
{
xtype: 'panel',
layout: 'fit',
region: 'center',
items: [{
xtype: 'textarea',
id: 'today'
}]
}]
},
The north one is a dataview (the height change each time an item is removed) and the other one is just a textarea. Both of them must be a part of a tab(today). Thanks in advance for your help. T. |
|
#5
|
||||
|
||||
|
So how are you HOPING that the DataView gets sized? Who does the sizing, and why?
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them. ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu Read the docs too: http://extjs.com/deploy/dev/docs/ See Saki's samples: http://examples.extjs.eu/ Build your own Ext: http://extjs.com/products/extjs/build/ Scope: http://extjs.com/forum/showthread.ph...642#post257642 |
|
#6
|
|||
|
|||
|
well I was just hoping I could find a solution to display a notification banner at the top of the textArea.
All I wanted is keeping the total height of the panel, and split vertically between a dataView ( or something else clickable) and a textArea.. I will work on something else then. Thanks anyway. T. |
|
#7
|
||||
|
||||
|
No. This will work. You are very close.
I'm saying you are making a fundamental mistake which is flagged up ion manuy places in the API docs! Try to say why you made the assumptions yoiu did. The DataView is not being sized is it? That is your problem. YOu have to ask its Container to size it. This is the fundamental of Ext that you MUST learn. A Container's layout manager sizes child items. You did not specify one.
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them. ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu Read the docs too: http://extjs.com/deploy/dev/docs/ See Saki's samples: http://examples.extjs.eu/ Build your own Ext: http://extjs.com/products/extjs/build/ Scope: http://extjs.com/forum/showthread.ph...642#post257642 |
|
#8
|
|||
|
|||
|
Thanks for your help,
I knew the dataview container has to resize itself according to its child(the dataview).. that's why I put in comment the height because I tried any layout for it without any success. ![]() Please, give me a clue. Thanks T. |
|
#9
|
||||
|
||||
|
Clue?
I have told you precisely what is wrong. You have wrapped your DataView inside a Panel which does not use a sizing layout manager. Do not wrap it in a Panel unless you need to have a header, and toolbars, and if this is the case, use a layout which sizes the DataView in the way you want!
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them. ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu Read the docs too: http://extjs.com/deploy/dev/docs/ See Saki's samples: http://examples.extjs.eu/ Build your own Ext: http://extjs.com/products/extjs/build/ Scope: http://extjs.com/forum/showthread.ph...642#post257642 |
|
#10
|
|||
|
|||
|
I tried any layout to auto size the height of the dataview without any success...
|
![]() |
| Thread Tools | |
|
|