Open nicoulaj opened 13 years ago
Updated by m...@typidee.com on 2009-12-22T19:09:53
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);
Originally filed by m...@typidee.com on 2009-12-22T18:48:43
What steps will reproduce the problem?
EXPECTED:
max height of menu should be bounded by the bottom of the stage
ACTUAL:
Menu extends off the bottom of the stage and no scroll bars are displayed
Control Version: current example on this site OS: MacOS 10.6.2 Browser 1: Firefox 3.5.6 Browser 2: Safar 4.04 Flash Player: MAC 10,0,32,18 (DEBUG)