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. how i can make color to active line in richtextBox ?

how i can make color to active line in richtextBox ?

Scheduled Pinned Locked Moved C#
4 Posts 3 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.
  • A Offline
    A Offline
    Ahmed R El Bohoty
    wrote on last edited by
    #1

    Hello Guys: how i can make color to active line in richtextBox ? ============================================== see this image and u will know what i need http://www.4zz.net/up/uploads/d69700664b.gif ==============================================:rose::rose::rose::rose: .:::thanks in Advance::.

    T 1 Reply Last reply
    0
    • A Ahmed R El Bohoty

      Hello Guys: how i can make color to active line in richtextBox ? ============================================== see this image and u will know what i need http://www.4zz.net/up/uploads/d69700664b.gif ==============================================:rose::rose::rose::rose: .:::thanks in Advance::.

      T Offline
      T Offline
      TeddyLiu
      wrote on last edited by
      #2

      RichTextBox richTextBox1 = new RichTextBox(); richTextBox1.BackColor = Color.Yellow; richTextBox1.SelectionStart = 0;(starting point of text selected ) richTextBox1.SelectionLength = 4;( the number of characters selected ) richTextBox1.SelectionFont.Bold = true; richTextBox1.SelectionStart = 9;(starting point of text selected ) richTextBox1.SelectionLength = 5;( the number of characters selected ) richTextBox1.SelectionFont.Bold = true;

      H 1 Reply Last reply
      0
      • T TeddyLiu

        RichTextBox richTextBox1 = new RichTextBox(); richTextBox1.BackColor = Color.Yellow; richTextBox1.SelectionStart = 0;(starting point of text selected ) richTextBox1.SelectionLength = 4;( the number of characters selected ) richTextBox1.SelectionFont.Bold = true; richTextBox1.SelectionStart = 9;(starting point of text selected ) richTextBox1.SelectionLength = 5;( the number of characters selected ) richTextBox1.SelectionFont.Bold = true;

        H Offline
        H Offline
        hiremath71
        wrote on last edited by
        #3

        hi, richTextBox1.BackColor = Color.Yellow; will make the entire richtextbox backcolor to yellow. Instead of making perticular line or active cursor position. with regards prasad:)

        A 1 Reply Last reply
        0
        • H hiremath71

          hi, richTextBox1.BackColor = Color.Yellow; will make the entire richtextbox backcolor to yellow. Instead of making perticular line or active cursor position. with regards prasad:)

          A Offline
          A Offline
          Ahmed R El Bohoty
          wrote on last edited by
          #4

          Not work , i want make color to one line in richtextbox1(active line) as this http://www.4zz.net/up/uploads/d69700664b.gif[^] i have idea but not work with me 1)test the cursor position 2)for the line where cursror is active make color to it plz help me to do it

          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