Labell Height

K

kirkm

Is it possible to calculate the Height value
for a label, depanding on contents ?

I've been counting the number of lines by

frmSerial.Label1.Height = ((CountCR(frmSerial.Label1)) * 10) + 10

Where 10 is font size + 2.

It sort of works but isn't 100%, especially when there's line wrap.

Is there a better way ?

Thanks - Kirk
 
Top