How to set maximun length for GoComment

Dear All,

I'm using GoComment control in my diagram. I want to restrict the text entered in the comment control. ie to set maximum length of the comment control. Can any one please help me to do this ? Thanks in Advance . . .
Thanks & Regards, Kannan

This might be useful:
http://www.nwoods.com/forum/forum_posts.asp?TID=571
But instead of replacing the GoIconicNode.Label by overriding GoIconicNode.CreateLabel, you’ll want to override GoComment.CreateLabel to make sure the GoComment.Label is a instance of a subclass of GoText that overrides GoText.DoBeginEdit so that it can customize the TextBox that it creates for in-place editing.

Hi Walter,
Thank you so much for the solution.
I’m able to do using the following code,

public class MyGoComment : GoComment<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

{

public MyGoComment()

{

this.Label.Editable = false;

}

public override bool OnSingleClick(GoInputEventArgs e, Northwoods.Go.GoView view)

{

if (this.Document != null && this.Document.CanEditObjects())

this.Label.DoBeginEdit(view);

TextBox textBox = this.Label.Editor.GetControl(view) as TextBox;

textBox.MaxLength = 50;

return base.OnSingleClick(e, view);

}

} Once again thanks for the immediate reply. Thanks & Regards, Kannan