5 Replies Latest reply on Jul 30, 2008 4:57 AM by zz_james

    Text Box Pagination

    zz_james
      Is there a simple way to create text boxes with <<back next>> links instead of scrolling?

      I have found some articles on pagination, but they are about paginating data-sets, I was just hoping to do something simple with text boxes, i.e. if the text was long enough to have to scroll then bring up buttons, and show a 'boxfull' at a time, I wasn't sure maybe this is built into flex, but I can't find the doc. or someone knows of nice component or tutorial.

      Thanks for any response

      James
        • 1. Re: Text Box Pagination
          ntsiii Level 3
          Nope, sorry, not built in. But that shouldn;t be hard to build. have a go at it and post if you have problems.

          Tracy
          • 2. Re: Text Box Pagination
            zz_james Level 1
            I'll give it a go, I'm assuming the easiest way to do it is to hide the scrollbar and make a button that moves the text 'as if' it had been scrolled a screen/window/box-full, using maxscrollH or something.... I'll keep in touch with developments, I only have a day to do it !
            • 3. Re: Text Box Pagination
              zz_james Level 1
              I tried setting the horizontalScrollPolicy of the text component to 'off' but this doesn't work. any ideas??

              • 4. Re: Text Box Pagination
                zz_james Level 1
                oh wait. I'm talking nonsense. sorry. text controls do not have scroll bars.
                • 5. Re: Text Box Pagination
                  zz_james Level 1
                  This is my best effort, happily use and improve. I had a problem with getting on the text length variables inside the set Text() method. The 'change' event on the textarea box does not seem to fire either, so I am restoring to using enterFrame, not ideal... any ideas??

                  Should be able to use instead of TextArea or Text and will work ok. just drop it in and set text from the tag, e.g. save it as PageText.mxml and call it with the tag
                  <nbsp:PagedText id="yourId" height="200" width="300" text="{yourtextsource}"/>

                  improvements could be, numbered page links accross the bottom using link-bar..better styling of buttons..