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 goto functionality

Richtextbox goto functionality

Scheduled Pinned Locked Moved C#
tutorialquestion
2 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.
  • K Offline
    K Offline
    kamalesh5743
    wrote on last edited by
    #1

    Hi, How to get goto functionality in richtextbox... richtextbox.Find(NextLine, LineNo, RichTextBoxFinds.WholeWord) takes lot of time....any faster way to highlight the line or just get cursor on that line Regards KAMALESH

    %#&kmpYrlHSGYG5@#($_+!@!(*JASnjshdk,cm_0ashjhdbn@#$!48mkhfbchsh))^%#W%&@YW7wsdfjw789';'][]\`~JKJQ4$!@#~)-HSKS^&*1)JK12@#@$~!1`DFGkqp][]\]?Zas;EWRG%!@~)(^&BVAG

    J 1 Reply Last reply
    0
    • K kamalesh5743

      Hi, How to get goto functionality in richtextbox... richtextbox.Find(NextLine, LineNo, RichTextBoxFinds.WholeWord) takes lot of time....any faster way to highlight the line or just get cursor on that line Regards KAMALESH

      %#&kmpYrlHSGYG5@#($_+!@!(*JASnjshdk,cm_0ashjhdbn@#$!48mkhfbchsh))^%#W%&@YW7wsdfjw789';'][]\`~JKJQ4$!@#~)-HSKS^&*1)JK12@#@$~!1`DFGkqp][]\]?Zas;EWRG%!@~)(^&BVAG

      J Offline
      J Offline
      John_Adams
      wrote on last edited by
      #2

      Hi Kamlesh, Please try the following code snippet and see if this helps. The following code shows how to use one of the overloaded versions of Find. ------------------------------------------------------------------------- BEGIN CODE public int FindMyText(string searchText, int searchStart, int searchEnd) { // Initialize the return value to false by default. int returnValue = -1; // Ensure that a search string and a valid starting point are specified. if (searchText.Length > 0 && searchStart >= 0) { // Ensure that a valid ending value is provided. if (searchEnd > searchStart || searchEnd == -1) { // Obtain the location of the search string in richTextBox1. int indexToText = richTextBox1.Find(searchText, searchStart, searchEnd, RichTextBoxFinds.MatchCase); // Determine whether the text was found in richTextBox1. if(indexToText >= 0) { // Return the index to the specified search text. returnValue = indexToText; } } } return returnValue; } ------------------------------------------------------------------------- END CODE Hope this helps.

      Regards, John Adams ComponentOne LLC

      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