Iconic node border

Hi,
I’d like to make a number of iconic nodes to load a image file from my pc,
however I can’t the node’s border after resize iconic node as below.
Can you tell me how to resize suitably the iconic nodes if you have some
other property for such operations?
Code:
openFileDialog1.Filter = “Bitmap Files (.bmp)|.bmp|JPEG (.JPG,.JPEG,.JPE,.JFIF)|.JPG;.JPEG;.JPE;.JFIF|GIF (.GIF)|.GIF|TIFF (.TIF,.TIFF)|.TIF;.TIFF|PNG (.PNG)|.PNG|All files (.)|.” ;
openFileDialog1.RestoreDirectory = true ;
string StrFilePath = string.Empty;
if( openFileDialog1.ShowDialog() == DialogResult.OK )
{
if( !File.Exists( openFileDialog1.FileName ) )
{
MessageBox.Show( “dddd”, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information ) ;
return ;
}
else
{
StrFilePath = openFileDialog1.FileName;
GoImage img = new GoImage();
img.Name = StrFilePath;
GoIconicNode ico = new GoIconicNode();
ico.Initialize(null, null, string.Empty);
ico.Icon = img;
ico.Resizable = true;
ico.Position = new PointF(20, 20);
ico.Port.Bounds = ico.Icon.Bounds;
ico.Label.Editable = true;
ico.Label.FontSize = 8;
ico.Label.Multiline = true;
ico.Label.AutoResizes = true;
ico.Label.AutoRescales = true;
this.goView1.Document.Add(ico);
ico.DoBeginEdit(this.goView1);
}
}

Thanks,

GoIconicNode doesn’t include a border, so you must have added that in order to get those red squares that I see in your two screenshots.
So the question is: how did you add the border? If you added it as a GoRectangle child to the GoIconicNode, did you override LayoutChildren so that the GoRectangle’s Bounds are automatically set to be just a bit bigger than the GoIconicNode.Icon’s Bounds?

An alternative implementation strategy is shown by the LitIconicNode example class in the Demo1 sample. But you presumably would remove the override of OnEnterLeave if you didn’t want that mouse-over effect.