开发者

How do I add a scroller to a Menu in Flex 4

In flex 4 I'm using a PopUpButton with a Menu populated with records from the database.

For one of our clients, 开发者_开发技巧the data provider of the Menu has more than 50 elements.

When they click on the Menu it expands beyond the height of the screen without showing a scroller or responding to the mouse-wheel. So in effect there is no way to access the lower items on the menu.

So I need to somehow restrict the height of the menu and add a scroller.

The rowCount and maxHeight commands are having no effect.

var companyContextMenu:Menu=new Menu();
companyContextMenu.maxHeight=400;
companyContextMenu.rowCount=20;

The same code was working fine before migrating to Flex 4.

Any help is much appreciated.


In Flex there is a big different regarding scrollbars between version 3 and 4.

First, please don't mix the halos and the sparks. Then put a scroller-Tag around the menu, that should become a scroller. Just the container Group, DataGroup, VGroup, HGroup and TitleGroup implement IViewport and can handle the scoller-tag ouround them.

So, put your menu in one of the container above. Is this not handle for you, please post your code.

BR Frank

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜