Hi folks
I struggling with labels
I have the following function
If I execute:
The outcome is
But if I execute:
The label pads verticaly as it was a string in an uppercase and with accent situation, althow it does not contain that characters
How can I achieve that the text anchors directly to 0x and 0y? with the width there is no problem. The thing comes out with the spacing from the label above the text
TIA (-->Shortcut to "Thanks In Advance")
I struggling with labels
I have the following function
B4X:
Sub getRect(b4xv As B4XView) As B4XRect
Dim b4xc As B4XCanvas
b4xc.Initialize(b4xv)
Return b4xc.MeasureText(b4xv.Text, b4xv.font)
End Sub
If I execute:
B4X:
Dim cls As Label
cls.Initialize("")
cls.SingleLine=True
pInt.AddView(cls, 0,0,1dip,1dip)
b4xV=cls
b4xV.Font=xc.b4xFontBold(xc.bigSize*1.5)
b4xV.Text="Áap"
b4xV.Color=Colors.Yellow
Dim b4xr As B4XRect=xc.getRect(b4xV)
b4xV.SetLayoutAnimated(0, 0,0,b4xr.Width, b4xr.Height)
But if I execute:
B4X:
Dim cls As Label
cls.Initialize("")
cls.SingleLine=True
pInt.AddView(cls, 0,0,1dip,1dip)
b4xV=cls
b4xV.Font=xc.b4xFontBold(xc.bigSize*1.5)
b4xV.Text="a"
b4xV.Color=Colors.Yellow
Dim b4xr As B4XRect=getRect(b4xV)
b4xV.SetLayoutAnimated(0, 0,0,b4xr.Width, b4xr.Height)
The label pads verticaly as it was a string in an uppercase and with accent situation, althow it does not contain that characters
How can I achieve that the text anchors directly to 0x and 0y? with the width there is no problem. The thing comes out with the spacing from the label above the text
TIA (-->Shortcut to "Thanks In Advance")