`

How to change text of CBA buttons?

 
阅读更多
<iframe align="center" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog336280.html" frameborder="0" width="336" scrolling="no" height="280"></iframe>

Origine:http://forum.newlc.com/index.php/topic,12882.0.html

In theRSS file:

RESOURCE CBA r_yourapp_softkeys_options_open
{
buttons =
{
CBA_BUTTON { id=EAknSoftkeyOptions; txt = "Options"; },
CBA_BUTTON { id=EYourAppCmdOpenApp; txt = "Open"; }
};
}

RESOURCE CBA r_yourapp_softkeys_options_stop
{
buttons =
{
CBA_BUTTON { id=EAknSoftkeyOptions; txt = "Options"; },
CBA_BUTTON { id=EYourAppCmdStopApp; txt = "Stop"; }
};
}


In the HRH file:

enum TYourAppCommandIds
{
// ...
id=EYourAppCmdOpenApp,
id=EYourAppCmdStopApp,
// ...
};


In your application's AppUi class:

void CYourAppUi::SetCommandSetL(TInt aResourceId)
{
CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
cba->SetCommandSetL( aResourceId );
}


Now you can call:

SetCommandSetL( R_YOURAPP_SOFTKEYS_OPTIONS_OPEN );
OR
SetCommandSetL( R_YOURAPP_SOFTKEYS_OPTIONS_STOP );

where ever you want.




分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics