B Bryan Member Licensed User Longtime User Dec 26, 2014 #1 I am changing the contents of a label displayed for a widget. Text size is being automatically changed depending on the number of characters displayed in the label. So all the text is displayed in a single line. The problem is my text will not be centered horizontally or vertically when the text is scaled to fit in the label. Initially it is, but as soon as the text size changes I lose the gravity settings that were set in designer for the label. Is there a way to set gravity after text size has changed? Help is always appreciated. Thankyou
I am changing the contents of a label displayed for a widget. Text size is being automatically changed depending on the number of characters displayed in the label. So all the text is displayed in a single line. The problem is my text will not be centered horizontally or vertically when the text is scaled to fit in the label. Initially it is, but as soon as the text size changes I lose the gravity settings that were set in designer for the label. Is there a way to set gravity after text size has changed? Help is always appreciated. Thankyou
Erel B4X founder Staff member Licensed User Longtime User Dec 28, 2014 #2 The gravity is set in the XML file that the compiler generates. It doesn't change when you change the text size. Upvote 0
The gravity is set in the XML file that the compiler generates. It doesn't change when you change the text size.