Hi dojo,
I'm running into a strange issue and could use your insight.
In my RemoveField method, I'm currently calling RemoveWidget for each widget in the selected section.
This works— all widgets are successfully removed—though I realize it's not the most efficient approach.
While reviewing the documentation, I came across the Clear()
method, which seems ideal for this use case.
However, when I replace my current code with section.Clear(), nothing happens. I trigger the same button click as before, but the section remains unchanged—none of the widgets are removed.
Any idea what I might be missing?
Thanks in advance for your help!
I can think of 2 possible reasons:
- do you use an InteractiveController? This is responsible for the event loop.
- do you Rebuild your dialog after you cleared the section?