on 11-11-2005 9:02 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To me this sounds like an editor for news messages where you want to restrict the maximum line length.
You could set TextEdit.cols = 72 to restrict the number of columns in the browser and after submitting the text, you could split the TextEdit.text into chunks of at most 72 characters separated by new line characters.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.