Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. RichTextBox - Text

RichTextBox - Text

Scheduled Pinned Locked Moved C#
questiontutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dataminers
    wrote on last edited by
    #1

    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...

    S 1 Reply Last reply
    0
    • D dataminers

      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...

      S Offline
      S Offline
      santhosh padamatinti
      wrote on last edited by
      #2

      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

      D 1 Reply Last reply
      0
      • S santhosh padamatinti

        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

        D Offline
        D Offline
        dataminers
        wrote on last edited by
        #3

        Program how to interact when cursor on this word?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups