The state-specific properties and the methods used for setting them for the generic button include the following:
|
Property |
Method in CAknButtonState |
|---|---|
|
Text |
|
|
Icon |
|
|
Flags |
|
|
Help text |
// Set second state as having latched frame
button->State( 1 )->SetFlags( KAknButtonStateHasLatchedFrame );
// Set text and help text to second state
HBufC* buttonText = StringLoader::LoadLC( R_MYAPP_BUTTON_TEXT );
HBufC* buttonHelpText = StringLoader::LoadLC( R_MYAPP_BUTTON_HELP_TEXT );
button->State( 1 )->SetTextL( *buttonText );
button->State( 1 )->SetHelpTextL( *buttonHelpText );
CleanupStack::PopAndDestroy( 2 ); // buttonText, buttonHelpText
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.