You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTML text has to be measured on the client using Wisej.Base.TextUtils.MeasureTextAsync.
If you the set containing Panel to AutoSize=true and fix the Minimum and Maximum Width it will grow vertically to fit the content. May have to change the AutoSizeMode to GrowAndShrink if you want the panel to shrink.
There is also a bug with the regular AutoSize implementation of Label and Button not considering CRLF to grow vertically and not using the Min/Max constraints.
I am noticing that the label's autosize is not really working. At runtime, I am setting a new text (2 words) and it seems that it is not displaying the 2nd word, like the label borders are not wide enough when autosize = true. Is this a bug that has already been fixed?
Also, on the previous note about using MeasureTextAsync, how do you write this example in VB.NET ?
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2017-11-03 18:09:25 UTC
The text in the label has CRLF?
itg-assistant commentedon Jun 12, 2026
Matthew Ferry answered 2017-11-03 21:33:17 UTC
The text in the label is created by the user in page of the app - using TinyEditor, so I imagine that would be "
" - label is set to allowhtml.
itg-assistant commentedon Jun 12, 2026
Luca answered 2017-11-04 23:34:47 UTC
Try this:
private void button1_Click(object sender, EventArgs e)
{
this.label1.Text = this.tinyEditor1.Text;
Wisej.Base.TextUtils.MeasureTextAsync(this.label1.Text, true, this.label1.Font, (size) => {
this.label1.Size = size;
});
}
HTML text has to be measured on the client using Wisej.Base.TextUtils.MeasureTextAsync.
If you the set containing Panel to AutoSize=true and fix the Minimum and Maximum Width it will grow vertically to fit the content. May have to change the AutoSizeMode to GrowAndShrink if you want the panel to shrink.
There is also a bug with the regular AutoSize implementation of Label and Button not considering CRLF to grow vertically and not using the Min/Max constraints.
itg-assistant commentedon Jun 12, 2026
Frank (ITG) answered 2017-11-05 12:59:16 UTC
Bugs are logged as WJ-8566 and WJ-8567 and will be fixed in the next Wisej build. Regards, Frank
itg-assistant commentedon Jun 12, 2026
Frank (ITG) answered 2017-11-16 00:48:10 UTC
Hi Matthew,
WJ-8566 and WJ-8567 are fixed in the latest Wisej release (1.4.50).
Best regards
Frank
itg-assistant commentedon Jun 12, 2026
Robert answered 2018-03-09 22:05:00 UTC
I am noticing that the label's autosize is not really working. At runtime, I am setting a new text (2 words) and it seems that it is not displaying the 2nd word, like the label borders are not wide enough when autosize = true. Is this a bug that has already been fixed?
Also, on the previous note about using MeasureTextAsync, how do you write this example in VB.NET ?
Thanks in advance
Robert
itg-assistant commentedon Jun 12, 2026
Luca answered 2018-03-09 22:08:32 UTC
Send a test case please.