MrK

Is there a work around for the text alignment bug in ToolStripSplitButton

To replicate,

Create a toolstrip on a form

Add a SplitButton

Set button text to "Hello"

Set the image.

Set ImageAlign middle left

Set TextAlign to middle right

Set AutoSize to false

Set Width to something such as 150

Run and text is NOT aligned left, but instead looks ugly crammed up against the image.

Thanks

Mark




Re: Windows Forms General ToolStripSplitButton ImageAlign TextAlign

Rong-Chun Zhang - MSFT

Hi Mrk,

Have you try to set ToolStripItem.TextImageRelation Property. It allows you get or sets the position of ToolStripItem text and image relative to each other. I have set it to TextImageRelation.Overlay and it worked well here.

Hope this helps.

Regards