Take a look at http://shemesh.wordpress.com/category/flex/popupbutton/ to see if it may help.
--- In flexcoders@yahoogroups.com, "Alexander" <alexander.far...@...> wrote: > > Hello, > > I'm trying to port a bigger project from Flash CS4 to Flex 3 > and have a problem that the PopUpButton, that is located > at the right bottom of my app, opens downwards when > I click it and thus is being cut off. Only if I resize the > browser, it will open upwards as actually wanted by me. > > I've tried to prepare a simpler test case (s. the code below) > to demonstrate my problem, but can't reproduce it :-/ > > Also I would appreciate if someone could reproduce > me a simple trick to render some of the items (card suits) > in red foreground color instead of the default black? > Do I have to create a separate file as an item renderer > (still reading up there... and don't understand yet, > how to specify that file in my menu which I create in AS) > or is there maybe a simpler trick? > > Thank you for any hints and below is my test code > Alex > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > creationPolicy="all"> > <mx:Style> > @font-face { > src:url("C:\\WINDOWS\\Fonts\\times.ttf"); > fontFamily: myFont; > /* card suits */ > unicodeRange: U+2660-U+266B; > } > Menu { > fontFamily: myFont; > fontSize: 24; > } > </mx:Style> > > <mx:Script> > <![CDATA[ > import mx.controls.*; > > private function createMenu():void { > var bids:Array = [{label: "Pass"}]; > for (var i:uint = 7; i <= 10; i++) > for (var j:uint = 0; j < 4; j++) > bids.unshift({label: > i+"â â£â¦â¥".charAt(j%4)}); > > var menu:Menu = new Menu(); > menu.dataProvider = bids; > menu.selectedIndex = 0; > pub.popUp = menu; > } > > ]]> > </mx:Script> > > <mx:Canvas width="100%" height="100%"> > </mx:Canvas> > > <mx:ApplicationControlBar width="100%"> > <mx:Spacer width="100%"/> > <mx:PopUpButton id="pub" creationComplete="createMenu();"/> > </mx:ApplicationControlBar> > </mx:Application> >