Go To Line Number (in RichTextBox) 
Author Message
 Go To Line Number (in RichTextBox)

I've got a Rich Text box and I know that using the GetLineFromChar method,
you can get the line number of where your cursor is, but I've had a really
hard time trying to figure out how to implement a 'Go To Line Number' type
of procedure.

Does anyone have any idea or code on how to do this?



Mon, 05 Nov 2001 03:00:00 GMT  
 Go To Line Number (in RichTextBox)
I don't think there's a build in function for that. You will have to create
your own code.

One method is to search for the line position and stop the exit the loop
when the wanted line number is reached. Of course, this can be optimized by
starting somewhere in the middle of the text.


Quote:
> I've got a Rich Text box and I know that using the GetLineFromChar method,
> you can get the line number of where your cursor is, but I've had a really
> hard time trying to figure out how to implement a 'Go To Line Number' type
> of procedure.

> Does anyone have any idea or code on how to do this?



Fri, 09 Nov 2001 03:00:00 GMT  
 Go To Line Number (in RichTextBox)
I don't think there's a build in function for that. You will have to create
your own code.

One method is to search for the line position and stop the exit the loop
when the wanted line number is reached. Of course, this can be optimized by
starting somewhere in the middle of the text.

Let me know if you want some code for this


Quote:
> I've got a Rich Text box and I know that using the GetLineFromChar method,
> you can get the line number of where your cursor is, but I've had a really
> hard time trying to figure out how to implement a 'Go To Line Number' type
> of procedure.

> Does anyone have any idea or code on how to do this?



Fri, 09 Nov 2001 03:00:00 GMT  
 Go To Line Number (in RichTextBox)
Actually, yes, the reason I wrote this email is because I have been trying
off & on for days trying to do this somehow, but apparently, my logic
knowledge can't see a good way to do it.

If you have some code that will work I would most appreciate it.
--


Quote:
> I don't think there's a build in function for that. You will have to
create
> your own code.

> One method is to search for the line position and stop the exit the loop
> when the wanted line number is reached. Of course, this can be optimized
by
> starting somewhere in the middle of the text.

> Let me know if you want some code for this



> > I've got a Rich Text box and I know that using the GetLineFromChar
method,
> > you can get the line number of where your cursor is, but I've had a
really
> > hard time trying to figure out how to implement a 'Go To Line Number'
type
> > of procedure.

> > Does anyone have any idea or code on how to do this?



Fri, 09 Nov 2001 03:00:00 GMT  
 Go To Line Number (in RichTextBox)
You guys should use the EM_LINESCROLL message.

wParam = # to scroll horiz.
lParam = # to scroll vert.

--
Richard Cardarelle
Eclipse Applications
www.eclipseapplications.com


Quote:
> Actually, yes, the reason I wrote this email is because I have been trying
> off & on for days trying to do this somehow, but apparently, my logic
> knowledge can't see a good way to do it.

> If you have some code that will work I would most appreciate it.
> --



> > I don't think there's a build in function for that. You will have to
> create
> > your own code.

> > One method is to search for the line position and stop the exit the loop
> > when the wanted line number is reached. Of course, this can be optimized
> by
> > starting somewhere in the middle of the text.

> > Let me know if you want some code for this



> > > I've got a Rich Text box and I know that using the GetLineFromChar
> method,
> > > you can get the line number of where your cursor is, but I've had a
> really
> > > hard time trying to figure out how to implement a 'Go To Line Number'
> type
> > > of procedure.

> > > Does anyone have any idea or code on how to do this?



Sun, 11 Nov 2001 03:00:00 GMT  
 Go To Line Number (in RichTextBox)
Excuse my ignorance, but, let's say I have a form which gives me a number of
lines to scroll (lgTotal), how do I use EM_LineScroll?

David Wier

Quote:

>You guys should use the EM_LINESCROLL message.

>wParam = # to scroll horiz.
>lParam = # to scroll vert.

>--
>Richard Cardarelle
>Eclipse Applications
>www.eclipseapplications.com



>> Actually, yes, the reason I wrote this email is because I have been
trying
>> off & on for days trying to do this somehow, but apparently, my logic
>> knowledge can't see a good way to do it.

>> If you have some code that will work I would most appreciate it.
>> --



>> > I don't think there's a build in function for that. You will have to
>> create
>> > your own code.

>> > One method is to search for the line position and stop the exit the
loop
>> > when the wanted line number is reached. Of course, this can be
optimized
>> by
>> > starting somewhere in the middle of the text.

>> > Let me know if you want some code for this



>> > > I've got a Rich Text box and I know that using the GetLineFromChar
>> method,
>> > > you can get the line number of where your cursor is, but I've had a
>> really
>> > > hard time trying to figure out how to implement a 'Go To Line Number'
>> type
>> > > of procedure.

>> > > Does anyone have any idea or code on how to do this?



Mon, 12 Nov 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Go to specific line number - Rich Text Box

2. Go to specific line number - Rich Text Box

3. RichTextBox Line Numbers

4. Current number of lines visible in RichTextBox????

5. Current line number in a RichTextBox.

6. Get line number in RichTextBox

7. Current line number in a RichTextBox.

8. Current line number in a RichTextBox.

9. Number of lines in a richtextbox

10. PBM: Line numbers used by Goto method do not reflect displayed line numbers in document

11. Using Line Input to go back a line

12. Scroll line by line in RichTextBox

 

 
Powered by phpBB® Forum Software