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