I notice if I use a large font size around 30 point for the button text, it won't center the text properly (vertically) inside the button.
This puts the text "1.3" at the very bottom of the button with space at the top of the button. Why isn't the text centered vertically inside the button? If I change the font size to 20 it is centered just fine. I am using a large font because I want the text to occupy most of the button.
TIA
(B4A v6.0)
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Private btnResult As Button
btnResult.Initialize("")
Activity.AddView(btnResult, 20dip, 180dip, 75dip, 50dip)
btnResult.Text = "1.3"
btnResult.TextSize = 30
btnResult.Gravity = Bit.Or(Gravity.CENTER_HORIZONTAL, Gravity.CENTER_VERTICAL)
End Sub
This puts the text "1.3" at the very bottom of the button with space at the top of the button. Why isn't the text centered vertically inside the button? If I change the font size to 20 it is centered just fine. I am using a large font because I want the text to occupy most of the button.
TIA
(B4A v6.0)