Shlomo
Shlomo

Reputation: 3990

ExtJs - Make textarea always fit parent panel

How can I set a textarea to always have the width and height of the parent panel that it is added to?

What I tried:

layout      : 'fit',
items       : [
{
                  xtype    : 'panel',
                  title    : 'XML definition',
                  lid      : 'paneltextarea',
                  autoScroll: true,
                  autoWidth: true,
                  flex     : 1
               }
]

Into 'paneltextarea', this textarea will be added:

oTextarea = [{
               xtype : 'textareafield',
               name  : 'message',
               // value: strValue,
               flex: 1,
               border: 0,
               style : { border: 0 },
               lid: 'ietextarea'
            }];

Upvotes: 3

Views: 7784

Answers (1)

Shlomo
Shlomo

Reputation: 3990

I forgot to set layout : 'fit' in the parent.

Upvotes: 7

Related Questions