Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 09:14, 24 August 2007.

TSS000030 - Changing softkeys dynamically and disabling them in S60

From Forum Nokia Wiki


Subject:

 Changing softkeys dynamically and disabling them in S60 TSS000030

 

Platform(s):  Device(s), SW version(s):
S60 1st Edition
S60 2nd Edition
S60 3rd Edition
N/A

Category:

Symbian C++

Subcategory:

UI

Description:

Softkeys can be changed dynamically in the following way:
Define a new CBA resource (or resources) in the .rss file:
    RESOURCE CBA r_custom_cba1
      {
      buttons =
          {
          CBA_BUTTON { id = ECba1Button1; txt = "Button1"; },
          CBA_BUTTON { id = ECba1Button2; txt = "Button2"; }
          };
      }
Add definitions for new command IDs to the .hrh file:
    enum TMyMenuCmdIDs
        {
        // ...
        ECba1Button1,
        ECba1Button2
        };
And call SetCommandSetL() from the code:
#include <eikbtgpc.h>
    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
    cba->SetCommandSetL(R_CUSTOM_CBA1);
    cba->DrawNow();
See also predefined resources in avkon.rsg. For example, to change CBA buttons to Options/Cancel:
    cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_CANCEL);
To disable softkeys, use the predefined resource R_AVKON_SOFTKEYS_EMPTY.

Creation date:

February 24, 2003

Last modified:

April 25, 2007
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZTechnicalSolutionQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX