我在ScrollPane 添加了显示对象,
但当显示对象超过ScrollPane
的高度时,没有生成一个下拉条,致使显示对象都超出了
ScrollPane
是我的用法有问题吗??
下面是我的代码
package
{
import flash.display.Sprite;
import cn.flashk.controls.CheckBox;
import cn.flashk.controls.ScrollPane;
public class ScrollPaneExample extends Sprite
{
public function ScrollPaneExample()
{
init();
}
private function init():void{
var spanel:ScrollPane = new ScrollPane();
for (var i:int=0; i<100;i++){
var cb:CheckBox = new CheckBox();
cb.x = 10;
cb.y = 10+ i*30
cb.label = "按钮" + i;
spanel.addChild( cb);
}
this.addChild(spanel);
}
}
}