finding out if i have reached the end of a line in a text box

fguihen

Junior Contributor
Joined
Nov 10, 2003
Messages
248
Location
Eire
is there any easy way of finding out if i have reached the end of a line in a text box, so that if the text spills onto the next line il know, i can do something with it? i have thought about counting the charachters and stuff, but just wondering if theres a simpler way. im not entering the text directly into the text box, im entering it via code, you know

textbox1.text = "abcde...";
 
Counting characters will only work if you use a true type font, where every letter, takes up the same number of pixels. I'm sure there is a better way but I do not know it.
 
It would be easier with a rtb, as a multi-line textbox considers its content all one line.

It is possible to use a rtb?

Otherwise it might be easiest to inherit from textboxbase so you can set up an event that fires when a new line is created.
 
Back
Top