uifw/AvKon/src/AknListBoxSettingPage.cpp
branchRCL_3
changeset 20 d48ab3b357f1
parent 19 aecbbf00d063
--- a/uifw/AvKon/src/AknListBoxSettingPage.cpp	Tue Aug 31 15:28:30 2010 +0300
+++ b/uifw/AvKon/src/AknListBoxSettingPage.cpp	Wed Sep 01 12:16:19 2010 +0100
@@ -168,6 +168,35 @@
 	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
+        TRAP_IGNORE
+		    (
+            TKeyResponse response = ListBoxControl()->OfferKeyEventL( event, EEventKey );
+            if ( response == EKeyWasConsumed )
+                {
+                highLightEnabled = ETrue;
+                }
+            );
+        }
+    return highLightEnabled;
+    }
+
 void CAknListBoxSettingPage::CreateIconAndAddToArrayL(
     CArrayPtr<CGulIcon>*& aIconArray,
     const TAknsItemID& aId,