Winforms Attribute "read only

Newbie to Python trying to integrate building objects with Winforms GUI…
In the attached script I want to throw up the form - define a radius - click OK - the prompt asks for a point - I click in the Rhino space - a circle is drawn - the form stays on screen to repeat the operation until I click Cancel.

The script currently throws an error -> Message: attribute ‘ValueChanged’ of ‘NumericUpDown’ object is read-only if I un-comment line 44. I have had no luck trying to clear the read only after quite a bit of searching.

Once this error is solved I still want to achieve the rest of my functionality. I think that the solution relates to what comes after line 81 -> if name == “main”: but it seems that this issue is so basic that everyone assumes that it doesn’t need much explanation. I have searched a lot trying to acquire understanding but…

I am trying to keep my challenge simple so that the learning is clear. I thank any and all for input.WinForms-Simple-2.py (2.7 KB)

Back at it and now and getting the same “read only” error on a button. I believe this is an inheritance issue but I really am a beginner and struggling to get a handle on this. I have been working through the Rhino Python Primer but find that weak on the GUI stuff.

I would really appreciate some input / help here. I believe that if I can get this simple script running properly I will have a foundation for going forward to more complexity. TIA

I haven’t had a chance to run this script yet, but at first glance it looks like there should probably should be a += instead of just an =

Perfect - that took care of the read only error and the control is affecting the radius properly.
So the next challenge is to get the ?flow? that I want. -> throw up the form - define a radius - click OK - the prompt asks for a point - I click in the Rhino space - a circle is drawn - the form stays on screen to repeat the operation until I click Cancel.

Thanks a bunch Steve.