F Fotios Georgiadis Member Licensed User Longtime User Oct 30, 2019 #1 Hello! I have two labels (different colored text) and i need the first label's width to be the exact size of the word, so the second label can begin right next to it. Is there a way for the label to be the exact width of the word? Thank you in advance!
Hello! I have two labels (different colored text) and i need the first label's width to be the exact size of the word, so the second label can begin right next to it. Is there a way for the label to be the exact width of the word? Thank you in advance!
Erel B4X founder Staff member Licensed User Longtime User Oct 31, 2019 #2 What are you trying to do? Maybe there are simpler / better ways. Upvote 0
F Fotios Georgiadis Member Licensed User Longtime User Oct 31, 2019 #3 Erel said: What are you trying to do? Maybe there are simpler / better ways. Click to expand... I have two labels (first color text:white, second color text:green). Both of the labels get data from my database (so, they have variable width and text length too). I need to find the perfect width for the first label, because the second label begins right next to it. Upvote 0
Erel said: What are you trying to do? Maybe there are simpler / better ways. Click to expand... I have two labels (first color text:white, second color text:green). Both of the labels get data from my database (so, they have variable width and text length too). I need to find the perfect width for the first label, because the second label begins right next to it.
rraswisak Active Member Licensed User Longtime User Oct 31, 2019 #4 check this out ... https://www.b4x.com/android/forum/t...e-text-measurement-and-drawing.92810/#content Upvote 0
check this out ... https://www.b4x.com/android/forum/t...e-text-measurement-and-drawing.92810/#content
Erel B4X founder Staff member Licensed User Longtime User Oct 31, 2019 #5 Why don't you use CSBuilder for this? https://www.b4x.com/android/forum/threads/charsequence-csbuilder-tutorial.76226/#content BBLabel is another option: https://www.b4x.com/android/forum/t...-bbcode-parser-rich-text-view.106207/#content Upvote 0
Why don't you use CSBuilder for this? https://www.b4x.com/android/forum/threads/charsequence-csbuilder-tutorial.76226/#content BBLabel is another option: https://www.b4x.com/android/forum/t...-bbcode-parser-rich-text-view.106207/#content
F Fotios Georgiadis Member Licensed User Longtime User Oct 31, 2019 #6 Both of the ways can solve my problem. Thank you! Upvote 0