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. Index remains on 0(zero) in richtextbox

Index remains on 0(zero) in richtextbox

Scheduled Pinned Locked Moved C#
databasesql-serversysadmin
5 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.
  • D Offline
    D Offline
    Dot Net Dev
    wrote on last edited by
    #1

    Hi, I am creating query editor as in sql server. I have to use blue color for reserved words and black for others. I have inserted the color table in "RTF" of richtextbox , but the modifications in the "RTF" cause the index of richtextbox remains at zero. Please tell me the reason of this. Thanks, Sonia

    D 1 Reply Last reply
    0
    • D Dot Net Dev

      Hi, I am creating query editor as in sql server. I have to use blue color for reserved words and black for others. I have inserted the color table in "RTF" of richtextbox , but the modifications in the "RTF" cause the index of richtextbox remains at zero. Please tell me the reason of this. Thanks, Sonia

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Index? What index of RichTextBox?? Your question doesn't make any sense.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008
      But no longer in 2009...

      L D 2 Replies Last reply
      0
      • D Dave Kreskowiak

        Index? What index of RichTextBox?? Your question doesn't make any sense.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Dave I think what is meant by index is the index of a thing in the table or perhaps the index of paragraph etc being enumerated in the RTF.

        1 Reply Last reply
        0
        • D Dave Kreskowiak

          Index? What index of RichTextBox?? Your question doesn't make any sense.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          D Offline
          D Offline
          Dot Net Dev
          wrote on last edited by
          #4

          Cursor remains on the start of richtextbox.

          D 1 Reply Last reply
          0
          • D Dot Net Dev

            Cursor remains on the start of richtextbox.

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            Adding text to the RTB, or any TextBox for that matter, does not move the Caret. The property that controls the Caret position is SelectionStart. If you want to add text and move the Caret at the same time, use AppendText, or just set the SelectionStart property yourself.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008
            But no longer in 2009...

            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