Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic About CopyToClipboard & PasteFromClipboard (Read 1883 times)
grayhound
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Nov 8th, 2006
About CopyToClipboard & PasteFromClipboard
Nov 29th, 2006 at 6:35am
Print Post  
If the Tag of a FlowChartObject is String, It is OK.
ex:
box.tag = "abc";
flowChart.CopyToClipboard(true);
then
flowChart.PasteFromClipboard(...);

the new box's tag is still "abc";

but if the box tag is a Object, the new pasted box 's tag is null.
ex:

Lable label = new Label;
label .Text = "label1";
box.tag = label ;
flowChart.CopyToClipboard(true);
then
flowChart.PasteFromClipboard(...);

the new box's tag is null;

why?
the flowchart version is  4.2.1
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: About CopyToClipboard & PasteFromClipboard
Reply #1 - Nov 29th, 2006 at 10:54am
Print Post  
The Tag object must be serializable if you want it to be saved in diagram files, copied to / pasted from the clipboard, etc. If the Label class is defined in your application, add a [Serializable] attribute just above the class declaration.

Stoyan
  
Back to top
 
IP Logged
 
grayhound
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Nov 8th, 2006
Re: About CopyToClipboard & PasteFromClipboard
Reply #2 - Nov 30th, 2006 at 1:29am
Print Post  
Another question is:
box1's MasterGroup is group1.
then
flowChart.CopyToClipboard(true,true);
then
flowChart.PasteFromClipboard(x,y);
why the MasterGroup of new box is null?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: About CopyToClipboard & PasteFromClipboard
Reply #3 - Nov 30th, 2006 at 5:46am
Print Post  
The second bool parameter specifies if the subordinate items of a selected master item should be copied.

If only a subordinate item is selected, its master item and group won't be copied. You will have to programmatically add the master tem to the selection if you won't the group to be copied too.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint