protected virtual TopicEditControl CreateEditControl() { TopicEditControl ctl = new TopicEditControl(); ctl.Visible = false; ctl.Cancel += new EventHandler(EditControl_Cancel); ctl.Apply += new EventHandler(EditControl_Apply); return(ctl); }
public virtual void EditObject(ITextObject tobj) { if (EditMode) { EndEdit(false); } if (tobj == null || ReadOnly) { return; } if (EditControl == null) { EditControl = CreateEditControl(); } if (EditControl == null) { return; } if (EditControl.Parent != this) { this.Controls.Add(EditControl); } EditControl.BringToFront(); EditingObject = tobj; EditControl.Text = tobj.Text; ResetEditControlBounds(tobj); Font font; if (tobj.Font != null) { font = tobj.Font; } else { font = ChartBox.Font; } if (Zoom != 1.0f) { font = new Font(font.FontFamily, font.Size * Zoom, font.Style); } EditControl.Font = font; EditMode = true; }