2 Replies Latest reply on Sep 18, 2009 2:19 PM by teocomi

    Menu backgroundColor, Gumbo

    teocomi Level 1

      Hello everybody,

      i'm gettin crazy trying to change the background color of a simple Menu or MenuBar list (yes the submenu/popup list that appears when you click on the menu); i think i've already tried everything: CSS, actionscript, mxml, itemRenderer, programmatic skinnig.. but i cannot help it working!

       

      For istance i can easily skin the main buttons of the menu and the selection/ rollover color of its items but nothing more!

       

      Is this a bug with the gumbo version?

      Thanks folks!

        • 1. Re: Menu backgroundColor, Gumbo
          Peter deHaan Level 4

          @teocomi,

           

          Does this work for you?

           

          <?xml version="1.0" encoding="utf-8"?>
          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:s="library://ns.adobe.com/flex/spark"
                         xmlns:mx="library://ns.adobe.com/flex/halo">
              <fx:Style>
                  @namespace s "library://ns.adobe.com/flex/spark";
                  @namespace mx "library://ns.adobe.com/flex/halo";
                  mx|Menu {
                      contentBackgroundColor: red;
                  }
              </fx:Style>
              <mx:Menu id="mnu" labelField="@label" showRoot="false">
                  <mx:dataProvider>
                      <fx:XML xmlns="">
                          <nodes>
                              <parent label="One" />
                              <parent label="Two">
                                  <child label="Two.1" />
                                  <child label="Two.2" />
                                  <child label="Two.3" />
                              </parent>
                              <parent label="Three" />
                              <parent label="Four" />
                          </nodes>
                      </fx:XML>
                  </mx:dataProvider>
              </mx:Menu>
              <s:Button id="btn" label="Click to show Menu" click="mnu.show(btn.x + btn.width, btn.y);" />
          </s:Application>
          

           

          Peter

          1 person found this helpful
          • 2. Re: Menu backgroundColor, Gumbo
            teocomi Level 1

            thank Peter so much! it works now..

            i spent hours looking around on the internet, and i couldn't find anywere that i had to use "contentBackgroundColor" ..