diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-8F2D8656-B7F4-4BDA-81CB-8440A2FDDD82.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-8F2D8656-B7F4-4BDA-81CB-8440A2FDDD82.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,43 @@ + + + + + +Dimming +or hiding toolbar extension items +

You can dim or hide toolbar extension items if an extension item function +is not available in certain cases.

+

The example below shows how to set the extension button unavailable. In +the example, the boolean parameter aHide indicates if the +button should be hidden or dimmed.

+void CMyAppView::SetExtensionButtonUnavailableL( TBool aHide ) + { + CAknToolbar* toolbar = Toolbar(); + if ( toolbar ) + { + CAknToolbarExtension* toolbarExtension = toolbar->ToolbarExtension(); + if ( toolbarExtension ) + { + if ( aHide ) + { + // To show the item again: + // toolbar->HideItem( KExtensionButtonId, EFalse ); + toolbarExtension->HideItemL( KExtensionButtonId, ETrue ); + } + else + { + // To undim the item again: + // toolbar->SetItemDimmed( KExtensionButtonId, EFalse ); + toolbarExtension->SetItemDimmed( KExtensionButtonId, ETrue ); + } + } + } + } + +
\ No newline at end of file