iOS Question Problem in label

webhost.company

Active Member
Licensed User
Longtime User
Hello
I show my text in label
When i add border to label and radius corner, border is on text and i cannot see start text
 

tufanv

Expert
Licensed User
Longtime User
You can put the label inside a panel with borders.
in addition to Erel's suggestion, maybe your label height is too small so when you round the corners it cuts out the labels edges. Try a bigger height.
 
Upvote 0

webhost.company

Active Member
Licensed User
Longtime User
Hello
I show my text in label
When i add border to label and radius corner, border set on text and i cannot see start text
in addition to Erel's suggestion, maybe your label height is too small so when you round the corners it cuts out the labels edges. Try a bigger height.
No it isn't
My label is big
If i could padding label, it have solved
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can add the panel at runtime.

Something like:
B4X:
Sub AddPanelBeforeLabel(lbl As Label)
   Dim p As Panel
   p.Initialize("")
   Dim parent As Panel = lbl.Parent
   parent.AddView(p, lbl.Left, lbl.Top, lbl.Width, lbl.Height)
   p.SetBorder(2, Colors.Red, 4)
   lbl.RemoveViewFromParent
   p.AddView(lbl, 0, 0, p.Width, p.Height)
End Sub
 
Upvote 0

webhost.company

Active Member
Licensed User
Longtime User
You can add the panel at runtime.

Something like:
B4X:
Sub AddPanelBeforeLabel(lbl As Label)
   Dim p As Panel
   p.Initialize("")
   Dim parent As Panel = lbl.Parent
   parent.AddView(p, lbl.Left, lbl.Top, lbl.Width, lbl.Height)
   p.SetBorder(2, Colors.Red, 4)
   lbl.RemoveViewFromParent
   p.AddView(lbl, 0, 0, p.Width, p.Height)
End Sub
Good solution
 
Upvote 0
Top