Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trapping for Word Wrapping?

Status
Not open for further replies.

AlaskanRose

Programmer
Sep 25, 2002
1
US
I want to stop word-wrapping within a multi-line text box. The reason is that each line must be limited to 70 characters due to the limitations of a variety of customers that we disseminate messages to (such as weather forecasts, etc.). I would like to turn off the feature of word-wrapping and force a carriage return, but I do not see word-wrap as a property for a text box. If that is not possible, then I would like to know when the event of a word-wrap happens or to be able to know what position the cursor is in in order to anticipate adding a carriage return automatically. I do not see word-wrap as an event for a text box. What I am doing currently is searching for carriage returns when the text box is complete to count the number of characters between the carriage returns. This finds lines >70 characters, but adding carriage returns is awkward and takes time for the user to pretty up the text. I would like to be able to trap for a word wrap as it happens or just before it happens. Any thoughts on what would be a good approach to accomplish this?

Thanks,
Rose
Nat'l Weather Service Alaska Region

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top