3 Replies Latest reply on May 10, 2010 2:00 AM by Sree_D

    Can we get TextArea carriage return ?

    Patel Bharat Level 2

      Hi,

       

      Can we get carriage return indicator with TextArea ?

       

      Let me describe it in detail : I am using an TextArea with htmlText and want to get an record of each line ending point of TextArea.

      So when I request the textarea htmlText then i want some indication about cariage return.

       

      Can any one guide me !!

       

      Thanks

      Bharat Patel

        • 1. Re: Can we get TextArea carriage return ?
          Sree_D Level 2

          I am not sure if the text taken from text area will contain any characters to identify return. If not

          You can use a keyboard event to check for return key and store the text along with a special pattern when you find a return key and at the end you can take the whole text and can find the pattern to check for return keys.

          • 2. Re: Can we get TextArea carriage return ?
            Patel Bharat Level 2
            Thanks Sree_D for the replay..


            Actully, I want the indicator for we can say soft return type of things. Let me explain in more details.


            textComponent.jpg

            As I have an TextArea component with some specific width. Now I start typing text ( without pressing enter key )  after the word  "are" the next word "friend" go to next line.


            Now I want track that after the word "are" text gose to next line.


            So that when i request the component htmlText, i want to get indication about line complete after the specific word in the text.


            Thanks

            Bharat Patel

            • 3. Re: Can we get TextArea carriage return ?
              Sree_D Level 2

              Hi track the change in maxVerticalScrollPosition using change event which gets called when data is changed. maxVerticalScrollPosition is either incremented or decremented when ever text changes the line. Below is some description about it.

              Dont consider it as the number of lines, check only for change in line hope this is what you are looking for.

               

               

              maxVerticalScrollPositionproperty

              maxVerticalScrollPosition:Number

               

              The maximum value for the verticalScrollPosition property. Note that this is not the height of the content because the maxVerticalScrollPosition property contains the height of the content minus the height of the displayable area.

              The value of the maxVerticalScrollPosition property is computed from the data and size of component, and must not be set by the application code.

               

              This property can be used as the source for data binding. When this property is modified, it dispatches the maxVerticalScrollPositionChanged event.