iam extending the GoMultiTextNode in a class G1 .in that class iam adding heading to a go-view
that heading class extending from Gotext node .when i copy a go_view the copied object heading
need to change its color .but it remain the same the thing is Goview is not cloning the Costume
class that is inherited by GoMultiTextNode . the heading object remain same for original and copied object
Code::
public abstract class G1: GoMultiTextNode {
protected G1(Work workspace,string id,bool left,bool right): this(workspace,id) {
heading = new Heading(workspace,GetType().Name);
AddItem(heading,null,null); //this is not cloned by govew
}
}
public class Heading: GoTextNode {
private readonly GoImage icon;
private Workspace workspace;
private Port port;
private Heading(Workspace workspace,string text) {
this.workspace = workspace;
icon = new GoImage { Top = 0,Left = 3,Selectable = false,Image = Images.Label };
Add(icon);
GoShape shape = (GoShape)Background;
shape.FillShadedGradient(Color.WhiteSmoke);
shape.BrushStyle = GoBrushStyle.SimpleGradientHorizontal;
shape.BrushColor = Color.CornflowerBlue;
Text = text.PadLeft(text.Length + 9,' ');
AutoResizes = false;
Copyable = false;
Deletable = false;
DragsNode = true;
Label.Clipping = false;
Label.StringTrimming = StringTrimming.EllipsisCharacter;
Movable = false;
Pen = Pens.White;
Selectable = false;
Resizable = false;
ToolTipText = text;
Width = 120;
}
}