3
votes

Here, I created the panel with vbox layout and one TextArea item:

        Ext.create('Ext.form.Panel', {
            width        : 400,
            height       : 300,
            layout       :
            {
                type: 'vbox',
                align: 'stretch'
            },
            renderTo     : Ext.getBody(),
            items        :
            [{
                xtype      : 'textareafield',
                height     : 55        
            }]
        });

After render textareafields height property is equal to 55, but rendered components height isn't equal to 55.

Here is the fiddle: https://fiddle.sencha.com/#view/editor&fiddle/1ulh

2
What extjs version are you using and which theme ? need to set same in fiddle - Tejas
@Tejas1991 ExtJs 5.1.2.748. Theme Crisp. - Makha
Exactly which height you want to set -> whole component height(including field label) or ONLY input-el height ? I will make necessary fix accordingly - Tejas
@Tejas1991 Height of the whole textareafield component must be equal to 55. - Makha

2 Answers

4
votes

@Maxa: Sencha is specifying default min-height of text field as 60px.If you inspect element for only el part then you will get as below :

.x-form-text-default.x-form-textarea {
line-height: 15px;
min-height: 60px;
}

The possible solution is you will need to override this class/property in your own app's css file.Then it will get reflect.Please check this solution and reply.

-1
votes

Looks like the vbox is flexing by default. Here's a fiddle to help you out.