set a widget size to the parent size from python in kivy

Solutions on MaxInterview for set a widget size to the parent size from python in kivy by the best coders in the world

showing results for - "set a widget size to the parent size from python in kivy"
Simón
05 Oct 2019
1A widget keeps a reference to its parent in self.parent.
2So you can just use
3
4self.parent.size or self.parent.pos or whatever.
5
6Depending on what you're doing,
7it may be necessary or useful to make sure
8you check if self.parent is None first, 
9so that your code doesn't fail for widgets with no parent.
10
similar questions