Skip to content

how to delete a widget #644

Answered by ndonkoHenri
plugeit asked this question in Q&A
Nov 29, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

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/controls
  • page.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…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@plugeit
Comment options

@ndonkoHenri
Comment options

Answer selected by plugeit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants