ZForge.Controls.TreeViewAdv.Tree.NodeControls.NodeTextBox.CalculateEditorSize C# (CSharp) Method

CalculateEditorSize() protected method

protected CalculateEditorSize ( EditorContext context ) : Size
context EditorContext
return System.Drawing.Size
        protected override Size CalculateEditorSize(EditorContext context)
        {
            if (Parent.UseColumns)
                return context.Bounds.Size;
            else
            {
                Size size = GetLabelSize(context.CurrentNode, context.DrawContext, _label);
                int width = Math.Max(size.Width + Font.Height, MinTextBoxWidth); // reserve a place for new typed character
                return new Size(width, size.Height);
            }
        }