Open GoogleCodeExporter opened 9 years ago
WORKAROUND:
Calculate the available space for the menu and set that value to the maxHeight
var point:Point = new Point();
//translate to global cooridates
point = menuButton.localToGlobal(point);
//calculate maximum possible height, ignoring screen metrics
var maxPossibleListHeight:int = dataProvider.length * menu.rowHeight;
//calculate available space between the bottom of the button and the bottom of
the stage
var stageAvailableHeightBelow:int = this.stage.height - point.y;
//if we don't have enough space below the button to display the desired number
of rows
//explicitly set the max available height to force the menu to layout (and
scroll) in
the available space
if( stageAvailableHeightBelow < maxPossibleListHeight )
menu.maxHeight = stageAvailableHeightBelow;
menu.show(point.x, point.y);
Original comment by Typi...@gmail.com
on 22 Dec 2009 at 7:09
Original issue reported on code.google.com by
Typi...@gmail.com
on 22 Dec 2009 at 6:48Attachments: