This project is read-only.

i can't remove a shape

Aug 18, 2013 at 6:07 PM
i'm using a Diagram that i named "model1" in which i add some shapes
i tried to remove the shape by the way
but actually this doesn't take a visual effect on the Diagram
it's not removed from the stage
please can any body give a hand ?
Aug 19, 2013 at 8:12 AM

Just use diagram1.Delete() after selecting your element ;) how ever if you want to the use model1.Model.Shapes.Remove("sh1"); you should call refresh method of diagram and controller and lab lab lab :P
Aug 19, 2013 at 10:05 AM
Edited Aug 19, 2013 at 10:06 AM
Thank you for replying,

I can't find the Delete method, diagram1.Delete() doesn't exist of course in my code it would be model1.Delete() but it doesn't exist
Of course i tried to refresh the controller's diagram and the diagram but the view still unchanged :/

i tried also to show the shapes's numbers before and after deleting one shape
int NbrShapes = diagram1.Model.Shapes.Count;
MessageBox.Show("number of shapes =" +NbrShapes );
NbrShapes = diagram1.Model.Shapes.Count;
MessageBox.Show("number of shapes =" +NbrShapes );
it's working well ; the number of shapes is reduced after deleting but visually the shape is not deleted from the diagram :/

Thank you for your help ^^
Oct 14, 2015 at 9:15 AM
Call remove and then refresh