Public Sub AddTextItem2(Text1 As String, Text2 As String, Value As Object)
InsertAtTextItem2(items.Size, Text1, Text2, Value)
End Sub
Public Sub InsertAtTextItem2(Index As Int, Text1 As String, Text2 As String, Value As Object)
Dim pnl As Panel
pnl.Initialize("")
Dim lbl1 As Label
lbl1.Initialize("")
lbl1.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl1.Text = Text1
lbl1.TextSize = DefaultTextSize
lbl1.TextColor = DefaultTextColor
Dim lbl2 As Label
lbl2.Initialize("")
lbl2.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl2.Text = Text2
lbl2.TextSize = DefaultTextSize2
lbl2.TextColor = DefaultTextColor2
pnl.Color = DefaultTextBackgroundColor
Dim minHeight As Int
pnl.AddView(lbl1, 5dip, 2dip, sv.Width - 5dip, 20dip)
minHeight = su.MeasureMultilineTextHeight(lbl1, Text1)
lbl1.Height = minHeight
pnl.AddView(lbl2, 5dip, minHeight + 2dip, sv.Width - 5dip, 20dip)
minHeight = su.MeasureMultilineTextHeight(lbl2, Text2)
lbl2.Height = minHeight
InsertAt(Index, pnl, lbl1.Height + lbl2.Height + 2dip, Value)
End Sub