Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-24041

If horizontalAlign="center" is set on a Box container which contains a child with width="100%"; then when the verticalScrollBar is displayed, the horizontalScrollBar is also displayed to compensate for the width of the verticalScrollBar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.5 (Release)
    • None
    • mx: Box View
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Browser: Internet Explorer 7.x
      Language Found: English

    Description

      Steps to reproduce:

      1) Compile the following application:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application
      horizontalScrollPolicy="off"
      layout="absolute"
      verticalScrollPolicy="off"
      xmlns:mx="http://www.adobe.com/2006/mxml">

      <mx:VBox
      bottom="0"
      horizontalAlign="center"
      left="0"
      minHeight="0"
      minWidth="0"
      paddingBottom="20"
      paddingLeft="20"
      paddingRight="20"
      paddingTop="20"
      right="0"
      top="0">

      <mx:VBox
      backgroundAlpha=".5"
      backgroundColor="#000000"
      height="1200"
      width="100%"/>

      </mx:VBox>

      </mx:Application>

      Actual Results:
      Both scrollbars appear. It's worth noting that we already have to work around the constraint based layout model to get scrollbars to appear at all by setting the minHeight and minWidth properties on the VBox. That being said, even if these properties are removed and we allow the Application container to scroll the content, this issue is still present.

      Expected Results:
      A vertical scrollbar should appear when a container's content height exceeds the vertical constraint or dimension of the container. A horizontal scrollbar should appear when a container's content width exceeds the horizontal constraint or dimension of the container.

      Workaround (if any):
      I haven't found a decent workaround for this yet. I suppose it would be possible to remove the horizontalAlign property and center the content by setting all of the positions manually via ActionScript, but this would defeat the purpose of having a constraint based component architecture already in place.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: