Tuesday, October 5, 2010

Dynamic change CBA button



Code:
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

Code:
enum TYourAppCommandIds
(
/ / ...
id = EYourAppCmdOpenApp,
id = EYourAppCmdStopApp,
/ / ...
);

In your application''s AppUi class:

Code:
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.







Recommended links:



Do not let your single into a disturbance with



AVI to MKV



Comparison Server Applications



Why the concept of RECURRING war 3G



watch live tv online channels Movies shows



Piracy against a large, full of discussion of



YouTube to WMV



Dwell on a few major legal Risks IDC



Directory Fax Tools



Fit, Is The Best



The New Second Generation Of New ID Card Readers



Matroska to MPEG



Under the iceberg



No comments:

Post a Comment