void textBox_MouseCaptureChanged(object sender, EventArgs e) { if (isReportLoading) { return; } textBox = sender as IVL_TextBox; selectedControl = textBox; IVLProps = getControlProp(textBox); textBox.BringToFront(); showControlProperties(); drawSelectionRect(); }
private void addTextBox(ControlProperties IVLProps) { textBox = new IVL_TextBox(); textBox.Name = IVLProps.Name; textBox.Tag = IVLProps.BindingType; textBox.Size = new Size(IVLProps.Width, IVLProps.Height); textBox.Location = new Point(IVLProps.X, IVLProps.Y); textBox.Text = IVLProps.Text; textBox.Font = new Font(IVLProps.FontName, IVLProps.FontSize); textBox.ForeColor = Color.FromName(IVLProps.ForeColor); textBox.BorderStyle = BorderStyle.Fixed3D; textBox.Margin = new Padding(0); this.reportCanvas_pnl.Controls.Add(textBox); textBox.MouseCaptureChanged += textBox_MouseCaptureChanged; textBox_MouseCaptureChanged(textBox, null); }