I am using a derived GoText for the label in my derived subgraph class, by overriding the CreateLabel method.
The derived GoText class overrides the Paint method to render the text with a border pen and a fillbrush.
When I collapse the subgraph, the label is drawn half inside and half outside of the collapsed subgraph in the lower right corner (the label is a rather big size 22 text). This only happens when I override the paint method. When I don’t override paint, it works fine, and the label is drawn inside the collapsed subgraph.
I guess I must be missing something about either updating the bounds of the derived GoText, or the computelayout of the collapsed subgraph label / collapsed label spot or something else. From the documentation I can’t figure out what is missing.
The overriden Paint method in the derived GoText class:
public override void Paint(Graphics g, GoView view)<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
GraphicsPath path = new GraphicsPath();
path.AddString(Text,Font.FontFamily,(int) FontStyle.Regular,Font.Size,Location,StringFormat.GenericTyp ographic);
//draw outlined text
} I override the CreateLabel in my derived subgraph:
protected override GoText CreateLabel()
Pen pen = new Pen(darkGreenColor,2.0f);
MiGoText result = new MiGoText (pen ,Brushes.Transparent);
result.Selectable = false;
result.Alignment = TopLeft;
} Any ideas to what I am missing ? Please also see my post from last thursday about disabling snap-to-grid for some object. Regards Stig Nielsson