Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between text_size and texture_size in kivy label properties

Tags:

kivy

When setting up properties in kivy label, there are texture_size and text_size. What is the difference between them?

like image 895
DaveQ Avatar asked Oct 19 '22 07:10

DaveQ


1 Answers

texture_size is a dynamically generated dimension for Label in kivy. It depends on the text length and font size. It is parameter value for the attribute size.

Label:
    size: self.texture_size

text_size is an attribute for Label. Here you can hard-code the size of the Label.

Label:    
    text_size: cm(6), cm(4)
like image 54
Aanisha Mishra Avatar answered Oct 27 '22 08:10

Aanisha Mishra