uifw/AvKon/src/AknListBoxSettingPage.cpp
branchRCL_3
changeset 15 08e69e956a8c
parent 0 2f259fa3e83a
child 51 fcdfafb36fe7
--- a/uifw/AvKon/src/AknListBoxSettingPage.cpp	Mon Mar 15 12:41:34 2010 +0200
+++ b/uifw/AvKon/src/AknListBoxSettingPage.cpp	Wed Mar 31 21:59:52 2010 +0300
@@ -168,6 +168,33 @@
 	return EFalse; 
 	}
 
+//---------------------------------------------------------------------------------------
+// CAknListBoxSettingPage::EnableSingleClickHighlightL()
+// Enables highlight to listbox control in single click mode if needed
+//---------------------------------------------------------------------------------------
+//
+TBool CAknListBoxSettingPage::EnableSingleClickHighlight( TInt aCommandId )
+    {
+    TBool highLightEnabled = EFalse;
+   
+    if ( aCommandId == EAknSoftkeySelect &&
+            ListBoxControl()->ItemDrawer()->Flags() 
+                & CListItemDrawer::ESingleClickDisabledHighlight )
+        {   
+        TKeyEvent event;
+        event.iCode = EKeyOK;      
+        // restore highlight with simulated key event
+        TKeyResponse response = 
+            ListBoxControl()->OfferKeyEventL( event, EEventKey );        
+        
+        if ( response == EKeyWasConsumed )
+            {
+            highLightEnabled = ETrue;
+            }
+        }    
+    return highLightEnabled;
+    }
+
 void CAknListBoxSettingPage::CreateIconAndAddToArrayL(
     CArrayPtr<CGulIcon>*& aIconArray,
     const TAknsItemID& aId,