Can anyone give me any code examples on how to use tabbed dockable panels using rhinopython?
I can make the forms themselves ok (i’m using WPF rather than windows forms), but I’m not sure how to get them into the panels. I have seen the links below, but having no C# background they are not much help.
please excuse warming up this old thread. If a script gets compiled into a plugin using the RhinoScript compiler would it be technically possible to create a dockable panel from it if the script contains a WinForm ? In theory i would like to understand if the compiler could add similar information to the source files outlined here ?
Thank you Steve, i would even add the required info to the source files manually (eg. from an example) to make it work. But i have no way to compile the source files once they where edited, using the RhinoScriptCompiler.
I don`t think you are. If i create the source files i get them in my output (project) folder. But if i built the plugin, these files are not used. It uses a random named folder under this location instead:
If i have one python script named “Bratwurst.py” and add this as a command to the RhinoScriptCompiler, then choose to generate the source files i get these:
I´m not shure what to do with them once this is hooked up, without VS. An example would be useful how to create a dockable dialog using only python. (title of this thread). I´m curious if this might be added to the RhinoScriptCompiler, so users working with python are able to create dockable dialogs. If this could be done by changing the project files or cs files manually and then use these files with the RhinoScriptCompiler to actually compile them to a plugin, this would be nice. I guess someone using VS already does not need the RhinoScriptCompiler or the project files at all.
Maybe one user friendly way from a scripters point of view would be an implementation of a scripting based dockable user panel which accepts WinForms (or ETO forms) in the future. So instead of choosing Rhino.RhinoApp.MainWindow() as the parent when showing a form like this:
form.ShowDialog(Rhino.RhinoApp.MainWindow())
It could be shown using such a dedicated UserPanel as the parent window of a form made in python. From the RhinoCommon helfile i´ve gathered that the registration and opening of the panel could technically be done via python. I´ve no idea how much work is involved to actually accomplish that without compilation but would accept any way to do it without using VS.
It isn’t possible, I’m rearranging issues at the moment and the one listed above turned out not to be the (in my opinion) best way to get to the ability to create dockable panels with python. I will create a new issue on this topic