Custom GolabelLink

Hi all
I’m Junior with go digram So if you can help me plzz urgently
My Question is:
I need to Custom GoLabelLink so I can put an icon as GoSubGraphHandle on it when it clicked I will show Gridview
All in all I need to put an Icon or image on the link
Plzz help me ASAP I have to make Presentation for my project

You need to use a GoImage object as the GoLabeledLink.MidLabel. Something like:

[code] [Serializable]
public class GridViewIcon : GoImage {
public GridViewIcon() {
this.Selectable = false;
this.Name = “star.gif”;
this.Size = new SizeF(10, 10);
}

public GridViewIcon(String name) {
  this.Selectable = false;
  this.Name = name;
  this.Size = new SizeF(10, 10);
}

public override bool OnSingleClick(GoInputEventArgs evt, GoView view) {
  GoLabeledLink link = this.Parent as GoLabeledLink;
  if (link != null) {
    GoNode from = link.FromNode as GoNode;
    GoNode to = link.ToNode as GoNode;
    if (from != null && to != null) {
      MessageBox.Show("show GridView for link from: " + from.Text + " to: " + to.Text);
    }
    return true;
  } else {
    return false;
  }
}

}[/code]
Example usage:

[code] GoBasicNode n1 = new GoBasicNode();
n1.Text = “N1”;
goView1.Document.Add(n1);
GoBasicNode n2 = new GoBasicNode();
n2.Text = “N2”;
goView1.Document.Add(n2);

  GoLabeledLink link = new GoLabeledLink();
  link.ToArrow = true;
  link.FromPort = n1.Port;
  link.ToPort = n2.Port;
  link.MidLabelCentered = true;
  link.MidLabel = new GridViewIcon("star.gif");
  goView1.Document.Add(link);[/code]

thaaaaaaaaaaaaaaank you sooooooo much walter

but i still have a problem that i need to view text with the image
can you help me plz
where text should be on the center of the link and the image near the link arrow

GoLabeledLink also has FromLabel and ToLabel that are positioned near the From/To ends of the link.

Sorry I didn’t understand Plzz explain more

:) thaaaaank you I do it

I have another stupied Question :(
where to save the image that i will use
i save it at Recources file but it did'nt appear on my form
unless I write the full path

OooOOoO

also thank veeeeeeery much all
I find the solution :) :)