Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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...";

Posted
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.

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...