Highlighting without selecting


#1

Hey. Is it possible to highlight a node without selecting it? Node and/or link… thanks


#2

Certainly you can for links–look at the properties with “Highlight” in their names.
For nodes, there isn’t a standard way, because it depends on what appearance you want. It’s common enough to override Paint and ExpandPaintBounds to do what you want (call the base.Paint method after drawing whatever highlight you want).


#3

Need sample, please…


#4

well here is my code if this can help…
[code]
public
override void Paint(Graphics g, Northwoods.Go.GoView view)
{
if(Highlight)
g.DrawRectangle(new Pen(HighlightColor, 3),(int)Icon.Bounds.X -7 , (int)Icon.Bounds.Y - 5, (int)Icon.Bounds.Width + 14, (int)Icon.Bounds.Height + 10);

base.Paint (g, view);
}
[/CODE]