protected override void OnItemAssigned() { DrawText dt = Text0; if (dt != null) { if (this.Width < dt.TextBoxWidth) { this.Width = dt.TextBoxWidth; } } }
public void LoadData(DrawText obj, Form frm) { objText = obj; txtX1.Text = objText.Location.X.ToString(); txtY1.Text = objText.Location.Y.ToString(); lblColor.BackColor = objText.Color; lblFont.Text = objText.ToString(); txtName.Text = objText.Name; txtText.Font = objText.TextFont; txtText.ForeColor = objText.Color; txtText.Text = objText.TextContent; frmOwner = frm; txtAngle.Text = objText.TextAngle.ToString("F6"); }
public override void Copy(DrawingItem obj) { base.Copy(obj); DrawText v = obj as DrawText; if (v != null) { this.text = v.text; this.font = v.font; this.pos = v.pos; this.Angle = v.Angle; this._size = v._size; this.EnableEditing = v.EnableEditing; this.TabIndex = v.TabIndex; } }