For Each t As String In inTexts
FontHeight = Max(FontHeight, cvs.MeasureText(t, xui.CreateDefaultFont(inFontSize)).Height) 'max. text row height
Next
For Each t As String In inTexts
width = Max(width, cvs.MeasureText(t, xui.CreateDefaultFont(inFontSize)).Width) + 1 'maximal with
height = height + FontHeight + 1
Next