how to Prevents mouse clicks from penetrating the Rectangle in the zstack?
self._window = ui.Window("My Window", width=300, height=300)
with self._window.frame:
with ui.ZStack():
with ui.VStack():
label = ui.Label("")
def on_click():
self._count += 1
label.text = f"count: {self._count}"
def on_reset():
self._count = 0
label.text = "empty"
on_reset()
with ui.HStack():
ui.Button("Add", clicked_fn=on_click)
ui.Button("Reset", clicked_fn=on_reset)
ui.Rectangle(width=80, style={"background_color": 0x220000FF})
![5b633b1361fd6edef75d73438d86f5a](https://global.discourse-cdn.com/nvidia/original/3X/4/b/4b98522d19a74de38594fc7428ba42537957880c.png)
the red Rectangle pannel is on the button with zstack, when the mouse hovered on the red rectangle,how to prevent mouse press event