how to delete a widget #644
-
please answer and also any way to delete all the items |
Beta Was this translation helpful? Give feedback.
Answered by
ndonkoHenri
Nov 29, 2022
Replies: 1 comment 2 replies
-
If you mean - how to remove a control from the
See this if you don't still understand. All the above methods (pop, delete, remove)also applies for Column, Row, and all the others. That's just python. 😉 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
plugeit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you mean - how to remove a control from the
Page
, then simply remove it from its controls.page.controls
is a list, so you could use:page.controls.clear()
to remove all the items/controlspage.controls.remove(x)
to remove a particular control. The x parameter refers to the item/control to be removed from the list. If you stored to control to be deleted in a variable, then set item to that variable.page.controls.pop()
to remove the last control/item in the list. You could pass an index parameter to it which is the control's index in the list.See this if you don't still understand.
All the above methods (pop, delete, remove)also applies for Column, Row, and all the others. That's ju…