There was this guy that put out a whole tutorial. However, I think you are dependent on his own code, you will always have to have that module available.
Thanks, looks like something I can invest some time in to setup these type of forms. Can you maybe share some quick tips/tricks to set it up to make forms like your example.
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.
Thanks fro the elaborate walkthrough. It seems easy enough to get started.
One hurdle still to take: I have no python option in SharpDevelop_5.1.0.5216_Xcopyable
Ill have to do some googling to see whats up with that.
Careful when clicking the download link on that page; the download is hosted on sourceforge that is littered with decoy download buttons and pop-ups. Just do nothing and wait for the download to start automatically.
Question regarding the form made in Sharp Develop. How would you open the user form from outside the module? I can get it to work from inside the module but having trouble constructing the code to call the class from another module and have the userform open.