Flash 手动滚动列表
我需要使用箭头键手动处理在列表中的滚动,同时我成功地处理了通过项目更改选择的操作,如果列表大于其显示,并且需要使用滚动条,则滚动条不会滚动所选项目 这就是我现在所拥有的:Flash 手动滚动列表,flash,apache-flex,list,flash-builder,Flash,Apache Flex,List,Flash Builder,我需要使用箭头键手动处理在列表中的滚动,同时我成功地处理了通过项目更改选择的操作,如果列表大于其显示,并且需要使用滚动条,则滚动条不会滚动所选项目 这就是我现在所拥有的: function completionListUpDown(direction:Boolean):void{ if(direction){ if(popUp.completionList.dataProvider.length == (popUp.comp
function completionListUpDown(direction:Boolean):void{
if(direction){
if(popUp.completionList.dataProvider.length == (popUp.completionList.selectedIndex + 1)){
popUp.completionList.selectedIndex = 0;
}
else{
popUp.completionList.selectedIndex += 1;
}
}
else{
if(0 == popUp.completionList.selectedIndex){
popUp.completionList.selectedIndex = popUp.completionList.dataProvider.length - 1;
}
else{
popUp.completionList.selectedIndex -= 1;
}
}
}
这会像一个符咒一样在项目中滚动,但是如果有一个垂直滚动条,那么该滚动条将不会滚动。如何使滚动条滚动?哈哈,不管我刚找到解决方案,只要使用ensureIndexIsVisible(selectedIndex)
女巫名单班?来自Flex(mx软件包)?来自火花?第三方lib?sparks但我已经解决了
function completionListUpDown(direction:Boolean):void{
if(direction){
if(popUp.completionList.dataProvider.length == (popUp.completionList.selectedIndex + 1)){
popUp.completionList.selectedIndex = 0;
}
else{
popUp.completionList.selectedIndex += 1;
}
}
else{
if(0 == popUp.completionList.selectedIndex){
popUp.completionList.selectedIndex = popUp.completionList.dataProvider.length - 1;
}
else{
popUp.completionList.selectedIndex -= 1;
}
}
popUp.completionList.ensureIndexIsVisible(popUp.completionList.selectedIndex);
}