# .NET and More > Silverlight >  Formatting Multi-Line Textbox

## RobDog888

I need to limit a textbox to 40 characters per line and 5 lines max for a total  of 200 characters max entered.

Basically I need to set Tab stops at every 40 characters to force a new line.

Been searching and nada so far.

----------


## DeanMc

Rob, would your best option here not be to handle the text change event?

----------


## RobDog888

Quick fix was to limit the textbox to 200 chars, no prob, but to "simulate" the line limits I just turned on wordwrap. Lucky for me the area/size of the textbox almost perfectly fit 200 chars wrapped. They never knew the difference but I sure would like to figure out a solution like there is for VB6 multiline textbox with setting tab stops

----------


## DeanMc

Hmm,

I would imagine the best option is a custom textbox implementation but of course this adds more time to the project. Perhaps it is a "spare time" job.

----------


## RobDog888

Yea, "one day" perhaps. I got to enhance the app as I got two new requests from the QA dept. Always nit picking lol

----------


## DeanMc

Hey at least you have a QA dept, all I have is the missus!

----------


## RobDog888

Yea but you can sway the missus to pass your app lol

----------


## DeanMc

Well batting the auld eyelids does wonders....

On topic, if I get some spare time I might give this a look, a textbox with a few formatting properties like this would be a good project to work on.

----------

