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:16, 24 August 2007.

TSS000033 - Defining customized buttons for queries

From Forum Nokia Wiki


Subject:

Defining customized buttons for queries TSS000033

 

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

Category:

Symbian C++

Subcategory:

General

Description:

Customized buttons can be defined in resource files. For example:
RESOURCE CBA r_my_softkey
    {
    buttons =
        {
        CBA_BUTTON
            {
            id = EAknSoftkeyMaybe;
            txt = "Maybe"; // Texts can be defined in .loc file(s)
                           // to support language localization
            },
        CBA_BUTTON
            {
            id = EAknSoftkeyWhy;
            txt = "Why?";
            }
        };
    }
Customized softkeys are not translated to the device’s current language automatically by the framework, but they can be used instead of the built-in buttons anywhere. In case of a Query dialog:
RESOURCE DIALOG r_myconfirmation_query
    {
    flags = EGeneralQueryFlags;
    buttons = r_my_softkey; // note that own softkey is
                            // used as lowercase
    items =
        {
        DLG_LINE
            {
            type = EAknCtQuery;
            id = EGeneralQuery;
            control = AVKON_CONFIRMATION_QUERY;
            },
        ...
        }
The Query dialog behaves like any other dialogs and handles the softkeys with the OkToExitL() method:
// class CMyAknQueryDialog: public CAknQueryDialog, ...
#include <eikenv.h>
TBool CMyAknQueryDialog::OkToExitL(TInt aButtonId)
    {
    if (aButtonId == EAknSoftkeyMaybe)
        // Handle "Maybe" key press
    else if (aButtonId == EAknSoftkeyWhy)
        // Handle "Why" key press
    return ETrue;
    }
Code for launching the query dialog remains the same.

Creation date:

May 5, 2003

Last modified:

 
Related Discussions
Thread Thread Starter Forum Replies Last Post
Defining Property in Notifier girish_gowda General Symbian C++ 4 2007-09-17 10:31
Bluetooth server defining masoud_bayat General Symbian C++ 4 Yesterday 13:17
strings? praktikant General Symbian C++ 4 2007-07-13 09:28
如何在對話盒視窗中產生自己的按鍵 Waltzgon Symbian 0 2004-09-28 04:06
listbox with fourm rahulgowda General Symbian C++ 2 2004-11-23 09:50
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZTechnicalSolutionQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX