In my code, I used texture_size:self.size
to have the text in my label fit the width of the screen fully. It worked, but when I updated the text of the label it stopped getting displayed properly. I even tried using texture_update, but it didn't work. I'm not very experienced with kivy, so perhaps I'm missing a solution here. I did find some Scale label thing online, but it seemed way too complicated, and so I'm wondering if there is a simple way to achieve what I want. Thanks for your time. Edit: I was able to achieve my goal. Basically my app uses multiple screens, so before I created this screen when the user clicks the button to come here, and remove it when they go back. I'm leaving this up just in case someone else has a similar issue.
I believe you want text_size: self.size
texture_size in read only. Make sure sure size_hint
is also set to an appropriate value, a commonly useful combination of settings is
Label:
size_hint_y: None
text_size: self.width, None
height: self.texture_size[1]
which means:
which could be good default, as its often what people need, but making them default would constrain people who want something else.