private void tb_Leave(object sender, EventArgs e) { QQtextBox tb = sender as QQtextBox; description.Text = tb.Text; tb.Dispose(); Controls.Remove(tb); }
private void description_MouseClick(object sender, MouseEventArgs e) { QQtextBox tb = new QQtextBox(); tb.BorderStyle = BorderStyle.Fixed3D; tb.Text = description.Text; tb.Location = new Point(description.Left, description.Top - 2); tb.Size = new Size(description.Width, description.Height + 4); tb.Leave += new EventHandler(tb_Leave); tb.KeyDown += new KeyEventHandler(tb_KeyDown); Controls.Add(tb); tb.BringToFront(); tb.Focus(); }