TextBoxExt height adjustment

Is it possible to adjust the height of a TextBoxExt without having to change the font size?

Thank you.

3 Replies

VI Vinothini Syncfusion Team October 13, 2017 06:14 AM UTC

Hi Cristian, 
 
Thank you for using Syncfusion products. 
 
The height of the TextBoxExt can be changed using AutoSize and MultiLine property. Setting AutoSize to false allows you to change the height without changing the font size and also MultiLine property does the same function. You can find the code example and sample below. 
 
Code example [C#] 
 
 
// Method 1 with Multiline 
this.textBoxExt1.Multiline = true; 
//Method 2 with Autosize set to false and set height. 
this.textBoxExt2.AutoSize = false; 
this.textBoxExt2.Height = 55; 
 
 
 
Regards, 
Vinothini.R 



CN Cristian Nanea October 13, 2017 03:42 PM UTC

There is a way to center the text vertically (preferably using AutoSize set to false method)?

Thank you,

Cristian




VI Vinothini Syncfusion Team October 16, 2017 07:26 AM UTC

Hi Cristian, 
 
Thank you for your update. 
 
From your update, we can see that you are not using Multiline mode. So your requirement for single line mode can be done by placing the TextBoxExt inside a panel and set the Border style to none.  In this method, since we are using panel we can adjust the height of the panel instead of TextBoxExt. We have prepared the sample with this workaround and it is available in the below location. 
 
 
Regards, 
Vinothini.R 


Loader.
Up arrow icon