How to know when you are on next line when Multiline is switched on?.

  • Thread starter Thread starter Rocketman
  • Start date Start date
R

Rocketman

I am trying to find out when i reach the next line when multiline is
switched on and i DON'T PRESS ENTER TO GO TO THE NEXT LINE(lines
method is there for that purpose). Is there any other method i can use
so that when i automatically type on the next line i can know. I tried
to compare the Textlength with the width function but unfortunately
the width is calculated in Pixels and textlength is calculated in just
number of characters. Can anybody help
 
Hi Rocketman,
Do you use TextBox or RichTextBox?
If you use RichTextBox you have method GetLineFromCharIndex
That method return the index of the physical line (the line on the screen
not the line on the text) of the character, which index is passed as a
parameter.
I guess it might help you somehow to solve your problem.

HTH
B\rgds
100
 
Back
Top