0

Using KivyMD and I would like to add MDLabel using add_widget() I would like to set the size to

width = self.texture_size[0] 
height = self.texture_size[1]

Here is the rest of my code for the label.

            card.add_widget(MDLabel(
                text="Name: " + r[1],
                bold= True,
                size_hint=(None, None),
                halign="center",
                pos_hint={"center_y": .8}
            ))

How can I set width and height to self of the object I am creating as self in this case will refer to the main app?

Change the size of a MDLabel from a python code rather than a kv file.

swingline
  • 1
  • 1

0 Answers0