cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting Number of charecters in a text edit

Former Member
0 Kudos

I have a Text edit, this has been bined to an attribute called text attribute.

if user enters text, i have to set the text in such a way that each line has only 72 charectes,

1)is that i can restrict mt textedit size width in such a way that each like can be 72 charecters.

2)How can i set that each line should have only 72 chrectes, 73 rd charected should move to next line or user should press enter key so thst cursor moves to next line to enter 73rd charecter.

is there any idea and prefferebly some code

Regards,

Murali

View Entire Topic
Former Member
0 Kudos

Murali,

What you are wanting to do with a text edit is not possible. Even setting the 'cols' property will not work because of the nature of proportional fonts.

You could setup a series of input fields where each item is bound to an attribute that uses a simple type (string) and that simple type has a maximum length restriction. This would prevent the user from entering more than 72 characters per input field, but they would need to tab to the next input field to continue. If you setup a node and added the attribute under it, you could bind it to a little table to produce the series of input fields.

This is my only thought on how to achieve what you are wanting to do. Maybe someone else will come up with a better suggestion.

Cindy