Hi Willem, here is a quick guide:
- After downloading, open SharpDevelop and click on “New” document icon
- In the left column, highlight “Python”, in the right column choose “Form”
- Then click on “Create”
- You now have a new unsaved doc, “Sourcecode” Tab is active
- Change to “Design” Tab, so you can see your current WinForm (dialog)
- On the left, under “Tools” you can see all items under “Windows Forms”
- Drag and Drop eg. a Button over into your dialog
- To change its behaviour, select it and look on the right under “Properties”
- You can also add new behaviour to an element by double clicking it
Of course you can change properties of all selected items (or the form as well) from the right “Properties” section too. The Help Text under Properties is highly recommended.
Basically that is all required for a first start. Once you´ve set up your UI elements, you need to load the dialog in Rhino. This can simply be done in the same script the class is hosted by creating an instance of your form class and running it as shown above in my example script.
Personally i think WindowsForms are extremely powerful, you have a free visual editor, access to System.Drawing and millions of examples online. I´ll post some more examples if there is interest. One downside is exeption handling when running such forms in Rhino. A single error in the code can crash it, so save often. I do most of the visual UI Design in SharpDevelop and switch to the python editor at some point to set things up. If it crashes and i forgot to save, i just open TempScript.py and have lost nothing.