10 Replies Latest reply on Jan 13, 2009 7:27 AM by rtalton

    Vertical Scroll on List clips the text

      Hi,

      I am trying to use the mx control List component. I have 10 items to the displayed in the list and I have set the rowcount to 5. When I run the application I can see the vertical scrollbar but then it clips few characters of the longest text displayed. I don't want the horizontal scrollbar so I have it to off.
      Is there any way I can stop it from clipping the horizontal text?

      Thanks!
        • 1. Re: Vertical Scroll on List clips the text
          rtalton Level 4
          Have you altered any default settings you're not telling us about? Is this an item renderer, perhaps? This should not happen with a default List component.
          • 2. Re: Vertical Scroll on List clips the text
            Level 1
            No I have not modified any default settings. Here is the code -
            <?xml version="1.0" encoding="utf-8" ?>
            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns:local="*">
            <mx:XML id="xmlDP">
            <root>
            <node>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</node>
            <node>Donec sit amet dui nec pede aliquam auctor.</node>
            <node>Integer vestibulum sodales dui.</node>
            <node>Sed nonummy ligula et tortor.</node>
            <node>Aenean varius neque vel felis.</node>
            <node>Phasellus venenatis ipsum sit amet nisi.</node>
            <node>Nullam vitae turpis et ipsum cursus venenatis.</node>
            <node>Pellentesque tincidunt pede non arcu.</node>
            <node>Aliquam ut massa quis ante dignissim egestas.</node>
            <node>Curabitur facilisis velit sit amet metus.</node>
            <node>Vivamus ornare massa ac massa.</node>
            <node>Nam accumsan rutrum purus.</node>
            </root>
            </mx:XML>

            <mx:List id="list"
            dataProvider="{xmlDP.node}"
            horizontalScrollPolicy="off"
            verticalScrollPolicy="auto"
            rowCount="6"
            />

            </mx:Application>
            • 3. Re: Vertical Scroll on List clips the text
              rtalton Level 4
              Well, you're right. The wordWrap property is set to FALSE by default on Lists. Just change it to TRUE and you're good to go (wordWrap="true").
              Or stop using funny Latin words?
              • 4. Re: Vertical Scroll on List clips the text
                Level 7

                "rtalton" <webforumsuser@macromedia.com> wrote in message
                news:gk7ud1$hre$1@forums.macromedia.com...
                > Well, you're right. The wordWrap property is set to FALSE by default on
                > Lists. Just change it to TRUE and you're good to go (wordWrap="true").
                > Or stop using funny Latin words?

                Or set the verticalScrollPolicy to "on"


                • 5. Re: Vertical Scroll on List clips the text
                  rtalton Level 4
                  It's on by default; I was able to reproduce the issue just as it was posted. Manually setting verticalScrollPolicy to on made no difference. It was the wordWrap property, all right. Or maybe Flex hates Latin words. I never caught on to them in high school, so I don't blame Flex for its bias. I'm just sayin'. People need to stick to real words. Like "IHierarchicalCollectionViewCursor ".
                  • 6. Re: Vertical Scroll on List clips the text
                    Level 1
                    Hi,

                    Changing the text back to English doesnt make any difference. Same problem exists with English text also. Also if I set the wordwrap to true it makes it look a little ugly. It reduces the width and wraps the unwrapped (before) text also. Is there any other way we can stop it from cutting the text?

                    Thanks!
                    • 7. Re: Vertical Scroll on List clips the text
                      rtalton Level 4
                      You have to use word wrap or your text will be clipped.
                      If you think the results of the wrapped text sometimes aren't visually appealing, you're not alone. You will need to experiment with other text area settings, like the padding values and text justification. If your text is dynamic and changing, you will always have some combinations of text area settings and text which won't look right to you. Just as in print, how you set the text depends on the text. You probably won't want to change the settings everytime the text changes as that's too much work. Loosen up the character spacing, lower the padding and make the text area control a little wider so it looks more "open" and not so cramped.
                      Oh, and welcome to the world of typography!
                      • 8. Re: Vertical Scroll on List clips the text
                        ntsiii Level 3
                        verticalScrollPolicy is "auto" by default. Did you try Amy's suggestion? I recall reading that the designers decided to make automatic scrollbars intrude on the inner space of the control, rather than make it wider, to avoid triggering scrollbars in its parent.

                        verticalScrollPolicy="on" should make the last column size so the text is not clipped.
                        • 9. Re: Vertical Scroll on List clips the text
                          Level 1
                          Hi,

                          Setting the verticalscrollpolicy to 'On' and Wordrwrap to 'false' resolved my problem. Now it doesn't chop the text and doesn't do unnecessary wordwrap.

                          Thanks!
                          • 10. Re: Vertical Scroll on List clips the text
                            rtalton Level 4
                            Actually, your current settings will only prevent text from wrapping IF your List component is auto-resizing horizontally, which it does when using the code you posted. Your List is "growing" horizontally to fit the width of the text you provided. Unusual, but workable if you don't mind the List growing sideways and possibly pushing other components around the screen.
                            If eventually your List gets wider than your browser window, be sure to turn on the Horizontal scroll bars for the application window so we can read that text!.