Emme Developer Well-Known Member Licensed User Longtime User Apr 28, 2020 #1 Hi to all! I'm trying to use BBLabel and BBCodeView but i got strange behaviors, and i don't understand some things. 1) Is padding working in BBLabel and BBCodeView? I tried to se it by using this code, also i tried to add before and after set the text, in both case doesn't do nothing.. B4X: Copy Private BBLabelText As BBLabel BBLabelText.Text = $"[Color=#ffffff][Alignment=Center][font=frank size=30]hiii[/font][/Alignment][/Color]"$ BBLabelText.Padding.Initialize(24dip,0,0,8dip) Maybe can be the custom font? (I add it in customfonts, but i did not write the code 2) I tried a BBLabel and a BBCodeView with same text as write in previous code. I noticed that BBLabel'text is vertical centered, BBCodeView's text no. I tried to set text alignment in designer property, without success 3) Is there a way to center vertical the text? I know there is vertical offset, but the height of the view is setted dinamically Thanks to all
Hi to all! I'm trying to use BBLabel and BBCodeView but i got strange behaviors, and i don't understand some things. 1) Is padding working in BBLabel and BBCodeView? I tried to se it by using this code, also i tried to add before and after set the text, in both case doesn't do nothing.. B4X: Copy Private BBLabelText As BBLabel BBLabelText.Text = $"[Color=#ffffff][Alignment=Center][font=frank size=30]hiii[/font][/Alignment][/Color]"$ BBLabelText.Padding.Initialize(24dip,0,0,8dip) Maybe can be the custom font? (I add it in customfonts, but i did not write the code 2) I tried a BBLabel and a BBCodeView with same text as write in previous code. I noticed that BBLabel'text is vertical centered, BBCodeView's text no. I tried to set text alignment in designer property, without success 3) Is there a way to center vertical the text? I know there is vertical offset, but the height of the view is setted dinamically Thanks to all
Erel B4X founder Staff member Licensed User Longtime User Apr 28, 2020 #2 1) You need to set the padding before you set the text. The text should be the last property you set. 2, 3) The designer property is not used. You will need to do some work to vertically align BBCodeView to the center: https://www.b4x.com/android/forum/t...ically-text-in-bbcodeview.113470/#post-708356 Upvote 0
1) You need to set the padding before you set the text. The text should be the last property you set. 2, 3) The designer property is not used. You will need to do some work to vertically align BBCodeView to the center: https://www.b4x.com/android/forum/t...ically-text-in-bbcodeview.113470/#post-708356
Emme Developer Well-Known Member Licensed User Longtime User Apr 28, 2020 #3 Erel said: 1) You need to set the padding before you set the text. The text should be the last property you set. 2, 3) The designer property is not used. You will need to do some work to vertically align BBCodeView to the center: https://www.b4x.com/android/forum/t...ically-text-in-bbcodeview.113470/#post-708356 Click to expand... 2) Ok thanks 1) I tried also to set padding before set the text, but doens't seem to work. Padding is indeeded to move the text inside the label, or am i wrong? Upvote 0
Erel said: 1) You need to set the padding before you set the text. The text should be the last property you set. 2, 3) The designer property is not used. You will need to do some work to vertically align BBCodeView to the center: https://www.b4x.com/android/forum/t...ically-text-in-bbcodeview.113470/#post-708356 Click to expand... 2) Ok thanks 1) I tried also to set padding before set the text, but doens't seem to work. Padding is indeeded to move the text inside the label, or am i wrong?
Erel B4X founder Staff member Licensed User Longtime User Apr 28, 2020 #4 Best if you post a screenshot that shows what you got and explain how you want to change it. Upvote 0