Using self.page to check if a control is added to page? #5281
-
QuestionI just discovered that Flet controls have a So for example you could do something like this, to avoid if self.page:
self.update() Overall, being able to easily access the page is extremely useful. My concern is, I could not find this documented anywhere, so I'm not sure if it is a feature, or just something part of the architecture of Flet that should not be used any real code, or something that could be removed in the future. So the question is: is it OK to use Code sampleNo response Error messageNo response ------------------------------------------------------
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, you can check |
Beta Was this translation helpful? Give feedback.
Yes, you can check
self.page
to know if control instance has been added to a page.