Sub Class_Globals
Private label3, label4, label5 As Label
End Sub
Sub ArrangeLabels
'Measure label height based on the text they contain
Private lbl3_height, lbl4_height, lbl5_height As Int
lbl3_height = MeasureTextHeight(label3) + 16dip '16dip as spacing between labels
lbl4_height = MeasureTextHeight(label4) + 16dip
lbl5_height = MeasureTextHeight(label5) + 16dip
'Arrange labels based on the height of the labels on top them.
label4.top = label3.top + lbl3_height
label5.top = label4.top + lbl4_height
End Sub
Sub MeasureTextHeight(lbl As Label) As Int
If lbl.Text.Length < 1 Then Return 0
Private strngUtls As StringUtils
Return strngUtls.MeasureMultilineTextHeight(lbl,lbl.Text)
End Sub