Hi, Stoyan!
Thanks for your sample code, it works perfectly, but our project is a bit more complex.
We have a dropdown with all the diagram types.
The form contains a dropdown, a button, a diagramview and a shapelistbox.
When you change the dropdown value and click the button I want to load the shapes in the shape listbox and clear the diagram, allowing the user to start over a new diagram of other type.
I couldn't seem to make this even with your code (my best try was to be able to add the shapes to the shapelistbox but the default shapes are also there).
I did a lot of code with JDiagram but most of it was at the client side so I was thinking I know them well
I reviewed the documentation again but found nothing that can give me a clue on how to achieve my desired behaviour. Can you please help us again?
Does the ShapeListBox has something to do with the ShapeLibrary class?
If so - are the static methods responsible for loading the shapes into a shared location from where the shapelibrary / shape diagram can read them or instance is needed to be passed to some property perhaps?
Does it have some method to clear the items and then load the new?
Is the ShapeLibraryLocation responsible for the load / clear of the shapes inside the ShapeListBox?
Sorry for asking so much but I am eager to know everything as our project is already in a final phase, the logics are built, everything is almost ready, we are only missing the save / load functionality.
Any information will be highly appreciated.
Here is my latest try on the demo you sent.
https://chameleonbulgaria.com/ShapeLibTestDD.zip