Not as nice as a drag-and-drop form-layout tool, but I learned several things from your code. Like, maybe I should be using FloatingForms instead of Dialogs (I don’t usually need a result, just need to manipulate geo), the UseRhinoStyle thing (sadly it seems that’s only available in Rhino 8), and that lamda thing.
I’ve also been testing ChatGPT’s UI design capabilities. One thing is for sure, asking it to make a PyQt UI is 100x easier than creating Eto Forms. My limited programming skills may not have made it easy for me, and ChatGPT can still be very stubborn at times. Both Rhino and Eto are niche areas, and I agree that working with Eto is sometimes not trivial. It would be nice to have a lot more Eto examples.
I even thought, what if the discourse community collectively trained some AI assistant to help write Rhino-friendly Eto Forms?
Not that I know how to train such assistants… but even just having more examples of Eto to shove down Chat’s throat during evening conversations would help a lot.
Example Eto SVG loader
This example shows a way to
Load svg files into a grid view in different sizes
Combine different layouts
Overlay an image with lines
Embed an SVG into a button
Load content from a url
Are there any examples of “drag & drop” file importing?
I wanted to mockup a test form similar to this svg loader where it would have a blank “field” that you could drag and drop an image file into from finder/explorer and drop it into the the Eto.Form “field” which would then show a preview of said image and when the user clicks accept or okay it would “do something” with that bitmap, likely just have it loaded into memory for use elsewhere in a script or something.
I may try and mock that up and share here, the file I/O part seems straight forward enough to me but I’m hung up on how the drag/drop features work with eto.forms.controls.
Anyways, thanks for this example, I’m a visual learner and this is really helpful!
@Gijs we should get samples added to our github repo so they don’t get lost here in discourse. Others are welcome to add as well if they want to submit a pull request
Personally, I learned C# mostly (almost entirely) thanks to ILSpy and the Rhino/Grasshopper libraries.
I find that nothing is more instructive than reading the source code of people more skilled than us, rather than going through lengthy, abstract tutorials.
Given the undeniable lack of documentation on Eto, I couldn’t have managed without this approach for that library.
But I’m very excited to test ChatGPT and see how it goes!