Text Annotation ( not GoBalloon )

Hi Support Team!

I am using/testing GoDiagram component to use in our new application module, about Business Process Model.

I found and I created objects based on BPMN notation using GoDiagram component , but now I would like to create “Annotation” object, and I saw that GoDiagram has only GoBalloon to link with a node, is it?

I read this document:


And I saw that GoDiagram hasn´t Text Annotation similar object. Is there some way to use GoDiagram to design it? Thanks!

This will give you the shape you want…


public class AnnotationRect : GoRectangle {


/// Paint an annotation left-bracket




public override void Paint(Graphics g, GoView view) {

RectangleF rect = this.Bounds;

// ignore any Pen set on the rectangle for the fill…

DrawRectangle(g, view, null, this.Brush, rect.X, rect.Y, rect.Width, rect.Height);

DrawLine(g, view, this.Pen, rect.X, rect.Y, rect.X + 20, rect.Y);

DrawLine(g, view, this.Pen, rect.X, rect.Y, rect.X, rect.Bottom);

DrawLine(g, view, this.Pen, rect.X, rect.Bottom, rect.X + 20, rect.Bottom);



I’d recommend simply using this in a node that has a port on the left (or a GoBoxNode with the port set to FromSides = GoObject.MiddleLeft). and use a standard GoLink for the dotted connection.

In the link, override CreatePen like this:

public virtual Pen CreatePen() {

Pen pen = new Pen(Color.Black);

pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;

pen.DashCap = System.Drawing.Drawing2D.DashCap.Round;

pen.Width = 3;

return pen;


You probably already have SequenceFlow and MessageFlow style links… right? This is just another type of link.

Thank you for example.

Just one question: Is it possible add a editable text inside it? How can I do?

Depends on the node you want to use. You could derive from GoTextNode, and override CreateBackground to create the AnnotationRect above. In the case of GoTextNode (which has 4 ports) you might also want to override CreatePort and return null for the 3 “spots” that aren’t MiddleLeft so you have just one port on the left side.