1 Reply Latest reply on Jun 25, 2009 2:12 PM by Peter deHaan

    Skinning a Combo  box?

    Handycam Level 1

      I need to skin/recolor a mx:combobox in my application.

       

      I found ComboBoxSkin.mxml, but I see nothing in this file to specify th skin of the combo box's scroll bar.

       

      Ultimatekly, I'd like to use the scroll bar that my list controls are using, components.VerticalScrollbar1

        • 1. Re: Skinning a Combo  box?
          Peter deHaan Level 4

          Not sure if this would work, but it may help you get started:

          <?xml version="1.0"?>
          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                  xmlns:mx="library://ns.adobe.com/flex/halo"
                  xmlns:s="library://ns.adobe.com/flex/spark">
              <fx:Style>
                  @namespace mx "library://ns.adobe.com/flex/halo";
                  @namespace s "library://ns.adobe.com/flex/spark";
                  
                  .myDropdownStyleName {
                      verticalScrollBarStyleName: vsbStyles;
                  }
                  .vsbStyles {
                      baseColor: red;
                  }
              </fx:Style>
              <mx:ComboBox id="cb" rowCount="6" dropdownStyleName="myDropdownStyleName">
                  <mx:dataProvider>
                      <fx:String>(1) The quick brown fox jumps over the lazy dog.</fx:String>
                      <fx:String>(2) The quick brown fox jumps over the lazy dog.</fx:String>
                      <fx:String>(3) The quick brown fox jumps over the lazy dog.</fx:String>
                      <fx:String>(4) The quick brown fox jumps over the lazy dog.</fx:String>
                      <fx:String>(5) The quick brown fox jumps over the lazy dog.</fx:String>
                      <fx:String>(6) The quick brown fox jumps over the lazy dog.</fx:String>
                      <fx:String>(7) The quick brown fox jumps over the lazy dog.</fx:String>
                      <fx:String>(8) The quick brown fox jumps over the lazy dog.</fx:String>
                      <fx:String>(9) The quick brown fox jumps over the lazy dog.</fx:String>
                  </mx:dataProvider>
              </mx:ComboBox>
          </s:Application>
          

           

          Peter