I have a labels in clv with different size
I attached shot from my app
How do I can add space to left and right label?
I tried to add label into panel with special gap but result is not well
Private Sub AddPadding(lb As Label) As Panel
Dim left,top,width,height As Int
left = lb.Left
top = lb.Top
width = lb.Width
height = lb.Height
Dim newlbl As Label = lb
Dim parent As Panel = lb.Parent
lb.RemoveViewFromParent
Dim p As Panel
p.Initialize("")
p.Color = Colors.Transparent
parent.AddView(p,left - 8dip,top,width+8dip,height + 8dip)
p.AddView(newlbl,8dip,top,width-8dip,height)
Return p
End Sub
I remove label and add panel with label position (additional 8dip for left,top,width and height)
and then add main label into panel
Example of implementing a chat layout. It is based on xCustomListView. The text is created with a hidden BBCodeView (BCTextEngine) and the bubble is drawn with BitmapCreator. Extracting the image from BBCodeView is not trivial. See the code. The code is implemented in the Chat class which is...