Question
scrollList HighLight scrolling item
hi all, I need to highlight an item in a scrolllist using two buttons that start scrolling up and down. I managed to implement the routine but I have problems as soon as the system passes into the area of the list that is not yet displayed.
Does anyone have any advice? these are the two code elements that allow the transition with simplicity (even if not 100% functional)
void ProdManagerScreenView::shiftCurrentDrowerUp(void){
if(selectedDrowerItem>0){
selectedDrowerItem--;
HighlItem--;
scrollList10.animateToItem(selectedDrowerItem,-1);
clearDrowerSelection();//THIS CLEAR OLD SELECTED
HilightLineDrowerSelection(0,HighlItem);//HIGHLIGHT NEW ONE
scrollList10.invalidate();
//scrollList10.initialize();
}//
}
//
void ProdManagerScreenView::shiftCurrentDrowerDw(void){
selectedDrowerItem++;
if(selectedDrowerItem<scrollList10.getNumberOfItems()){
HighlItem++;
//SE SI, ANIMA TUTTO IN PASSI DI 1
scrollList10.animateToItem(selectedDrowerItem,-1);
//scrollList10.initialize();
clearDrowerSelection();//THIS CLEAR OLD SELECTED
HilightLineDrowerSelection(0,HighlItem);//HIGHLIGHT NEW ONE
scrollList10.invalidate();
//scrollList10.initialize();
} else{
selectedDrowerItem--;
}
}
//