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

Combobox does not honor the left and right style properties causing the width of the combobox to stop reducing in size once it hits the longest item in the list.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.2 (Release)
    • None
    • mx: ComboBox
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows
      Language Found: English

    Description

      Steps to reproduce:
      1. Create a new project.
      2. Paste the following code into project:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
      <mx:ComboBox y="260" left="10" right="673">
      <mx:dataProvider>
      <mx:ArrayCollection>
      <mx:source>
      <mx:Array>
      <mx:String>test1</mx:String>
      <mx:String>This is a really long item in a combobox which causes this combobox to not reduce its size down honoring its left and right values.</mx:String>
      <mx:String>test2</mx:String>
      <mx:String>test3</mx:String>
      <mx:String>test4</mx:String>
      <mx:String>test5</mx:String>
      </mx:Array>
      </mx:source>
      </mx:ArrayCollection>
      </mx:dataProvider>
      </mx:ComboBox>
      <mx:Button y="260" label="Button" width="655" right="10"/>
      <mx:ComboBox y="324" width="289" x="10">
      <mx:dataProvider>
      <mx:ArrayCollection>
      <mx:source>
      <mx:Array>
      <mx:String>test1</mx:String>
      <mx:String>This is a really long item in a combobox which causes this combobox to not reduce its size down honoring its left and right values.</mx:String>
      <mx:String>test2</mx:String>
      <mx:String>test3</mx:String>
      <mx:String>test4</mx:String>
      <mx:String>test5</mx:String>
      </mx:Array>
      </mx:source>
      </mx:ArrayCollection>
      </mx:dataProvider>
      </mx:ComboBox>
      <mx:Button y="324" label="Button" right="10" left="307"/>

      </mx:Application>

      3. Run project.

      Actual Results: The first combobox overlaps the button to its right once the width of the combobox hits the length of the longest item's text in the list.

      Expected Results: I would expect the combobox to continue to reduce its size and honor the right and left style properties I have set on it and truncate the value of the string just like the second combobox I have listed does when left and right style properties are not set.

      Workaround (if any): None that I know of.

      My problem with this is I have a program that has several comboboxes with other controls to the right of them and the comboboxes are overlapping the controls to their right when text in the list causes the combobox to stop reducing its size based on the width of the browser. I want my comboboxes to expand and contract based on the size of the browser window the user is in, but it can't overlap the controls to the right of the comboboxes. If I set static widths then the comboboxes do not overlap the controls to their right, but they also do not expand with the width of the browser.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: