equal
deleted
inserted
replaced
|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-3FE04A31-C35F-47E2-B615-6C1202FB8485" xml:lang="en"><title>Accessing |
|
13 toolbar items</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>Each item in the toolbar should have a unique ID. Use these IDs to access |
|
15 the toolbar items in your application.</p> |
|
16 <p>The example below shows how to access toolbar items using the contol ID.</p> |
|
17 <codeblock xml:space="preserve">void CMyAppView::DoSomethingToButton() |
|
18 { |
|
19 CAknToolbar* toolbar = Toolbar(); |
|
20 if ( toolbar ) |
|
21 { |
|
22 CAknButton* button = static_cast<CAknButton*>( toolbar->ControlOrNull( KButtonId ) ); |
|
23 if ( button ) |
|
24 { |
|
25 ... |
|
26 } |
|
27 } |
|
28 } |
|
29 </codeblock> |
|
30 </conbody></concept> |