RichTextBox - Text
-
I wrote a word in the RichTextBox, this word represent an object. I want to click this object. For example; I wrote following text to RichTextBox; Hello codeproject members. I want to "codeproject" word represent an object. May be get ID when click to this word. How can I do? Thanks...
-
I wrote a word in the RichTextBox, this word represent an object. I want to click this object. For example; I wrote following text to RichTextBox; Hello codeproject members. I want to "codeproject" word represent an object. May be get ID when click to this word. How can I do? Thanks...
Hi, Try like this may be its not correct approach. But it solves your problem.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}private void Form1\_Load(object sender, EventArgs e) { string s1 = this.richTextBox1.Text; sample o1 = new sample(); o1.sobject = s1; } } public class sample { public string sobject; }
To invent something, you need a mountain of junk in your mind. ---------------------Thomas alva edison
-
Hi, Try like this may be its not correct approach. But it solves your problem.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}private void Form1\_Load(object sender, EventArgs e) { string s1 = this.richTextBox1.Text; sample o1 = new sample(); o1.sobject = s1; } } public class sample { public string sobject; }
To invent something, you need a mountain of junk in your mind. ---------------------Thomas alva edison
Program how to interact when cursor on this word?