Profile Picture

Copy/Paste

Posted By Ron Sawyer 14 Years Ago
Author
Message
Ron Sawyer
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 16, Visits: 1
Hello, I just purchased Nevron Diagram for .NET. I am trying to create a simple diagram builder.

My apologies, I'm sure this is very simple, but how do I copy and paste the selected objects?

Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi,

Here’s a simple example on how to perform copy and paste operations:

 

NRectangleShape rect = new NRectangleShape(20, 20, 100, 60);

document.ActiveLayer.AddChild(rect);

 

NNodeList nodes = new NNodeList();

nodes.Add(rect);

 

view.Copy(nodes);

view.Paste();

 

 

If you want to copy/paste only the selected nodes, you can use the following code:

 

view.Copy(view.Selection.Nodes);

view.Paste();

 



Best Regards,
Nevron Support Team



Ron Sawyer
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 16, Visits: 1
Thanks for the quick reply. The question seems rather lame now...

I would swear I looked at the view's methods - but I guess I must have been looking at the document's methods instead.



Fabian Baptista
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 18, Visits: 1
And how can I do this from one view to another?
regards.

Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Fabian,

upon copying/pasting the clipboard is used, so you can copy from one view and paste in another in the same way. Call the "Copy" method of the first view and then the "Paste" method of the second.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic