On Sat, 14 Jan 2006 20:10:44 GMT, "Fabio Cannizzo"
<fc*****************@london.edu> wrote:
If a multiline text window is "scrolled", how can I get ho much it has been
scrolled from the begin of the document?
Thanks,
Fabio
You can do this by lines or by characters.
1 Characters:
The total number of characters is myTextBox.Text.Length, the character
position at the start of the current line is
myTextBox.GetFirstCharIndexOfCurrentLine(). From those two you can
get an idea of where you are in the text.
2 Lines:
The total number of lines is myTextBox.Lines.Count. To find the
current line use GetFirstCharIndexOfCurrentLine() as above and then
use GetLineFromCharIndex(int charIndex) to find the current line.
Again this will give you an idea of where you are in the text.
The Object Browser is your friend in things like this.
rossum
--
The ultimate truth is that there is no ultimate truth