开发者

ExtJs 4 - TextField Height not being maintained on window resize

开发者 https://www.devze.com 2023-04-02 14:06 出处:网络
I have a form inside a window which can be resized. Now, if the width of the window is reduced, then the width of textfield components present in the form also gets reduced. Due to this, the height o

I have a form inside a window which can be resized.

Now, if the width of the window is reduced, then the width of textfield components present in the form also gets reduced. Due to this, the height of label as well as the textfield increases upto the limit at which label gets displayed completely.

The question is - Can the height of text input field be kept fixed?

I tried using fieldStyle config and giving it a height property for textfield component, but, whenever I resize the window and check in DOM structure, I find that the height which I specified gets overwritten with a new one.

I am giving anchor as 100%, and I think that this is doing the resizing of textfields. But is it feasible to apply this only on width and not allow height to be modified?

Could someone please throw开发者_C百科 some light on this. Attached is a screenshot of the issue.

Thanks in advance.

ExtJs 4 - TextField Height not being maintained on window resize


The solution to this is using maxHeight config. Once the height is specified here, then even on window resize, the height of textfield doesn't increase beyond the limit provided. Hope this helps someone looking for something similar.

0

精彩评论

暂无评论...
验证码 换一张
取 消