Giving height to TextField Component

Hi all,

I need to set Height for TextField Component. Like

TextField userName = new TextField();

userName.setHeight(“42px”);

But once i do this, the TextField component automatically changes to TextArea Component

can any one help how to increase the height of the TextField.

Thanks in advance for your kind reply.

regards,
Aravind

The only option is to add a style name to your text field and alter the height using CSS.

Thanks. It works through CSS