473,671 Members | 2,454 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Jump to a specific line

Hello
I'm developing a program in c# that uses a RichTextBox.
Now i wonder, how can i jump to a specific line in the document that is
shown in that richtextbox?

/René
Nov 16 '05 #1
1 2689
"René" <ta*****@getnet .dk> wrote in message
news:cu******** **@news.cyberci ty.dk...
Hello
I'm developing a program in c# that uses a RichTextBox.
Now i wonder, how can i jump to a specific line in the document that is
shown in that richtextbox?

/René

richTextBox1.Te xt="The cat jumped over the wall and fell on top of Spotty
the dog. He didn;t like that one bit.";
int loc = richTextBox1.Te xt.IndexOf("Spo tty");
richTextBox1.Se lectionStart= loc;

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2454
by: Alan J. Flavell | last post by:
The page under discussion was http://ppewww.ph.gla.ac.uk/~flavell/www/html-smac.html An email correspondent referred to the link text "screenshot" in part 2, which in his case was coming at the right-hand end of a line. As soon as he hovered over it in MSIE, it sprang to the next line - making it impossible to use it, obviously. This didn't happen in Mozilla (which by the way reports that this page is in standards-compliance mode, if...
2
3389
by: Sandy | last post by:
See line beginning with WHAT GOES HERE ..... Do Until ......................... Code .... .... If .............. Then WHAT GOES HERE TO JUMP TO THE END OF THE LOOP AND LOOP AGAIN End If Processing Code
0
941
by: kcamhi | last post by:
Is there a way in either windows media player object or directshow (or other) to play a very specific subset of a video file? I have a single video file that I'll load that has a bunch of segments that I want to be able to jump to in reaction to different events and play from a specific frame to another specific frame. Is there any way to do that in WMP? Or if not does Directshow or another method support this?
1
2262
by: Dave E | last post by:
Hi folks, I have a VB.Net application, currently being developed on my XP Pro 2002 SP2 box. It is pretty straightforward and accesses my local SQL2000 instance. Randomly I get the above error (see subject line) and I am thus far unable to google my way out of it. I have tried "iisreset" but this has no effect. The error stops on line 258 below of machine.config:
4
2008
by: robert d via AccessMonster.com | last post by:
When my app starts up, it creates a temporary database. This temp database is created from a 'model' database that is in the same folder as the application. Because there is a model, the creation is essentially to just copy the 'model' database and give it the name of the application with the extension ".tmp". Then code opens the temp database and links to the tables. This has always worked flawlessly until today. Today, I needed to...
6
5035
by: Todd A. Anderson | last post by:
I have a function foo of which I need to get the address. The problem is that when you say "&foo" (or just foo for that matter), you get the address of this function's entry in a jump table and not the address of the function itself. Are there any BKMs for getting the real address or am I going to have to write a function that looks to see whether the address is a jump instruction and if so compute the real address from the jump target?...
3
3460
by: mckbill | last post by:
Is there a way I can direct the cursor to a specific field (variable) in a form by typing the field name while in form view? I have a form with many fields, and it would be nice if there were some method, similar to FIND RECORD (e.g., CTL + F ), where a dialog box would pop up and let me enter the field name, and then jump the cursor to that location. I currently do my edits by locating a record to be changed by ID using CTL+F and...
5
3486
by: Horacius ReX | last post by:
Hi, sorry but after looking for information, I still did not get how, when reading a text file in python, can one jump to a concrete line and then read the different data (separated by spaces). In each line there is different number of columns so sometimes i get kind of "index out" error. Is there a better way to read the different data on each row and avoiding to know the exact number of columns ? Thanks
1
1070
LacrosseB0ss
by: LacrosseB0ss | last post by:
Hey all; This question is a bit of a weird one I hope I can find an answer. Google was of not much help but it was hard to search. I am the webmaster for my church and we have been recording sermons and posting them online as podcasts since October (07). Since the new year hit we have been recording the entire service and posting excerpts up. Now, what I would like to do is with the audio file posted (mp3 format, embed tags, quicktime...
0
8483
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8402
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8605
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8676
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7445
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6237
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5703
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.