Button.AutoSize sizes too big when using nbsp (non breaking space) HTML markup

0
0

btnFixity.AutoSize = true;
btnFixity.AllowHtml = true;
btnFixity.Text = “&nbsp&nbspMyText”;

results in a wider than expected button.

It seems it is measuring the width of the 5 “&nbsp” characters instead of the single space that it actually is.  Not sure if there’s an easy fix.  Might have to use Graphics.MeasureString unless this is addressed.

Also, will use of Graphics.MeasureString or TextRendered.MeasureText, which relies on GDI and GDI+ , break in a WiseJ 3 Linux app?

thx

 

 

  • You must to post comments
0
0

AutoSize with HTML is not supported. You have to set the correct size or resize on the client or try TextUtils.MeasureTextAsync.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.