How to modify textbox inner padding

Hello,

I have a TextBoxExt control in Winforms.

I have a little problem with the vertical align of text. 

When TextAlign = Center -> it works fine, the text is vertically centered

When TextAlign <> Center -> the bottom padding is more than top padding therefore the text is not in center vertically.

Can you help me please how can I override this padding? There are no Padding property.

I try with this:

        protected override Padding DefaultPadding => new Padding(3, 6, 3, 3);

but has no effect.

I attach a video about this.

Thank you!


Attachment: NET_EFEe9Y79Kr_4a91816c.zip

3 Replies

BS Bhaskar Suresh Syncfusion Team February 7, 2024 04:59 PM UTC

Hi SZL,


We were unable to reproduce the reported issue from our side. Please refer to the attached sample and video for your reference.


Would you kindly share a modified demo sample that replicates the problem so that we can provide a solution?


Regards,

Bhaskar Suresh


Attachment: TextBoxExt_TextAlign_WF_2bbfca00.zip


SZ SZL March 25, 2024 02:44 PM UTC

Hi, sorry its a little hard to create a demo, because I have inherited custom controls. 

It's not a high priority issue, so if it comes up again, I'll try to make a demo. 

Thanky 



BS Bhaskar Suresh Syncfusion Team March 27, 2024 01:35 PM UTC

Hi SZL,


Thank you for the update. Please feel free to reach out to us at any time if you require further assistance.


Regards,

Bhaskar Suresh


Loader.
Up arrow icon