if you want to add to richTextBox add to Richtextbox.controls not this.controls
private void richTextBox1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
int c = 0;
TextBox newtext = new TextBox();
newtext.Name = "newtext" + c++;
newtext.Location = new Point(e.X, e.Y);
newtext.Size = new System.Drawing.Size(200, 25);
richTextBox1.Controls.Add(newtext);
}
}
i tried it it is working
check it again and be sure that this code block in side richTextBox_MouseDown
not in side Form1_MouseDown