fguihen Posted December 22, 2005 Posted December 22, 2005 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..."; Quote
Nate Bross Posted December 22, 2005 Posted December 22, 2005 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. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Diesel Posted December 22, 2005 Posted December 22, 2005 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.