number of lines per page

R

rammohan

hello

how can we get the number of lines in a page.
i am using richtext box control to develop a editor. in my
application line numbers are displayed on left side if u
choose the line numbers option for that i use another text
box. my problem is synchronization between these two text
boxes when u press page up and page down keys. for this i
plan to take the help of number of lines in user visible
screen(text area). can u help me out.


regards
--rammohan
 
J

Jon Skeet [C# MVP]

rammohan said:
how can we get the number of lines in a page.
i am using richtext box control to develop a editor. in my
application line numbers are displayed on left side if u
choose the line numbers option for that i use another text
box. my problem is synchronization between these two text
boxes when u press page up and page down keys. for this i
plan to take the help of number of lines in user visible
screen(text area). can u help me out.

Have you tried Height/Font.Height? That would seem the most obvious
thing to try to start with, although there may be some caveats about it
I'm unaware of.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top