diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-3FE04A31-C35F-47E2-B615-6C1202FB8485.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-3FE04A31-C35F-47E2-B615-6C1202FB8485.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,30 @@ + + + + + +Accessing +toolbar items +

Each item in the toolbar should have a unique ID. Use these IDs to access +the toolbar items in your application.

+

The example below shows how to access toolbar items using the contol ID.

+void CMyAppView::DoSomethingToButton() + { + CAknToolbar* toolbar = Toolbar(); + if ( toolbar ) + { + CAknButton* button = static_cast<CAknButton*>( toolbar->ControlOrNull( KButtonId ) ); + if ( button ) + { + ... + } + } + } + +
\ No newline at end of file