Need help on changing eto table value NumericUpDown

Hi everybody. i am finishing my explodeview script. but i want to add the function that when i change the value without pressing ok in the eto panel, the display on rhino will also change. According to my current code, only when I press ok, the command will execute. I want when changing the value in the eto table, the rhino also changes the position according to the new value to be more intuitive. Hope everyone can help me to complete it. Thanks
test eto.py (2.4 KB)

You need to add a method to listen for the key press.

Assign it in your init like this:

    self.KeyDown += self.on_key_down

And then the function would look something like this:

    def on_key_down(self, sender, e):
        if e.Key == forms.Keys.Enter:
            DoStuff()

you can do a similar thing with the esc key to cancel it.

I am a non-programmer. Can you help me fix my code. Thank you