uifw/ganes/src/HgScroller.cpp
branchRCL_3
changeset 6 9f56a4e1b8ab
parent 5 aabf2c525e0f
child 7 08e69e956a8c
--- a/uifw/ganes/src/HgScroller.cpp	Fri Mar 12 15:43:43 2010 +0200
+++ b/uifw/ganes/src/HgScroller.cpp	Mon Mar 15 12:41:34 2010 +0200
@@ -207,6 +207,9 @@
     {
     if( aIndex >= 0 && aIndex < iItems.Count() )
         {
+        iSelectedIndex = iItems.Count() - 1;
+        FitSelectionToView();
+        
         iSelectedIndex = aIndex;
         // Move view position so that it is fully visible.
         FitSelectionToView();
@@ -540,12 +543,16 @@
     {
     if( iScrollbar && iItemCount )
         {
+        TBool prevStatic = iScrollbar->IsStatic();
         iScrollbar->InitScrollBarL( Rect(), 
                                     TotalSize(), 
                                     TSize(iWidth, iHeight), 
                                     iLandscapeScrolling); 
 
         iScrollbar->SetViewPosition( iViewPosition - TPoint(iWidth/2, iHeight/2));
+        
+        if(prevStatic != iScrollbar->IsStatic())
+            HandleScrollbarVisibilityChange(iScrollbar->IsStatic());
         }
     }
 // -----------------------------------------------------------------------------
@@ -1755,5 +1762,4 @@
         }
     }
 
-
 // End of File