hi,
below code i am using for get the run time rich text box,but i need particular id,when click on any rich text box.
private
void richTextBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode.Equals(Keys.Enter))
{
//RichTextBox box1 = new RichTextBox();
//richTextBox1.MaximumSize = richTextBox1.Size;
//richTextBox1.SelectionTabs=
//if(richTextBox1.Height==147)
RichTextBox box1 =
new RichTextBox();
box1.Location =
new Point(richTextBox1.Location.X, richTextBox1.Location.Y + 170);
box1.Size = richTextBox1.Size;
box1.KeyDown +=
new KeyEventHandler(box_KeyDown);
//this.Controls.Add(box);
this.Controls.Add(box1);
}
}
void box_KeyDown(object sender, KeyEventArgs e)
{
int i = 170;
int j = Convert.ToInt32(this.Controls.Count.ToString());
int z = i * j;
//RichTextBox box = new RichTextBox();
RichTextBox box1 =
new RichTextBox();
box1.Location =
new Point(richTextBox1.Location.X, richTextBox1.Location.Y + z);
//box.Location = new Point(richTextBox1.Location.X, richTextBox1.Location.Y + 210);
box1.Size = richTextBox1.Size;
box1.KeyDown +=
new KeyEventHandler(box_KeyDown);
//this.Controls.Add(box);
this.Controls.Add(box1);
}
Venkat
------------------------------------------------
--------------------------------------------------------------------------------
Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Venkat