vanilla
vanilla copied to clipboard
Removing a row from a GridView does not remove it from the view
Minimal example:
class SimpleAppWindow(object):
def __init__(self):
self.w = vanilla.Window((250, 120), "Simple App Window", closable=False)
self.w.gridview = vanilla.GridView((10, 10, -10, 70), [
[vanilla.PopUpButton("auto", ["I should be removed"])],
[vanilla.PopUpButton("auto", ["I should remain"])],
])
self.w.button = vanilla.Button((10, 90, -10, 20), "Press me", callback=self.deleteTopRow)
self.w.open()
def deleteTopRow(self, sender):
self.w.gridview.removeRow(0)
# PUSH IT HARDER
self.w.setNeedsDisplay()
self.w.displayIfNeeded()
Before pressing the button (correct):

After pressing the button:
The first popup button can still be opened, selected, etc.