Using API or other method to count number of lines in a Rich Text Box 
Author Message
 Using API or other method to count number of lines in a Rich Text Box

I have used SendMessage Function in the past with regular TextBox control to
return the number of lines of text entered but it does not seem to work with
RichTextBox
control.   Any help will be greatly appreciated.

John



Thu, 01 Aug 2002 03:00:00 GMT  
 Using API or other method to count number of lines in a Rich Text Box


Quote:
> I have used SendMessage Function in the past with regular TextBox
control to
> return the number of lines of text entered but it does not seem to
work with
> RichTextBox
> control.   Any help will be greatly appreciated.

It works for me:
http://home.earthlink.net/~butlerbob/vb/controls/findpos.htm

--
Please reply via the newsgroup only

Sent via Deja.com http://www.deja.com/
Before you buy.



Thu, 01 Aug 2002 03:00:00 GMT  
 Using API or other method to count number of lines in a Rich Text Box
RichTextBox1.GetLineFromChar(Len(RichTextBox1.Text)) + 1

Dag.


Quote:
> I have used SendMessage Function in the past with regular TextBox control
to
> return the number of lines of text entered but it does not seem to work
with
> RichTextBox
> control.   Any help will be greatly appreciated.

> John



Fri, 02 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

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

2. Go to specific line number - Rich Text Box

3. Rich Text Box and line numbers

4. Line numbers beside a Rich Text Box

5. Numbering lines via a Rich Text Box

6. Go to specific line number - Rich Text Box

7. Looking for APIs for text box and Rich text box

8. Highlighting lines of text in a rich text box

9. Counting lines of text in a text box ????

10. Formatting Lines of Text in a Rich Text Box Control

11. Getting Line Text of a Rich Text Box - efficiently

12. Line numbers into multi-line text box

 

 
Powered by phpBB® Forum Software