diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-8845AFD6-F238-43FF-BD7B-902CD8CD3973.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-8845AFD6-F238-43FF-BD7B-902CD8CD3973.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,39 @@ + + + + + +Showing +and hiding toolbar items +

You can set toolbar items hidden or dimmed if a toolbar function is temporary +unavailable.

+

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

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