×

Discussion Board

Results 1 to 9 of 9

Thread: softkey problem

  1. #1
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    50

    Question softkey problem

    Hi all,
    Uptil now I was using menubar to handle any event but if I want to use just ok cancel button instead.
    on ok I want to move on next page.
    How should I proceed?
    If anybuddy knows plz help...
    Sohni.
    Last edited by sohnisheth; 2006-07-25 at 06:33.

  2. #2
    Registered User
    Join Date
    Jul 2005
    Location
    Bengaluru, India
    Posts
    747

    Re: softkey problem

    You may use R_AVKON_SOFTKEYS_OK_CANCEL as your CBA. Check avkon.rsg for more details.

  3. #3
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: softkey problem

    Hi,

    Use CEikCommandButtonContainer class. like this...

    Code:
    CEikButtonGroupContainer * iCba = CEikButtonGroupContainer::Current();
    	if( iCba) 
    	{
    		iCba->SetCommandSetL( R_AVKON_SOFTKEYS_OK_CANCEL );
    		iCba->DrawNow(); 
    	}
    or u can create ur own resource, like

    Code:
    RESOURCE CBA r_test_cmd
    {
    	buttons = 
    	   	{
    		CBA_BUTTON { id=ETestCmdAppCmd1; txt = "Cmd1"; },
    		CBA_BUTTON { id=ETestCmdAppCmd2; txt = "Cmd2"; }
    		} ;
    }
    and use it in CEikCommandButtonContainer class. Handle the commands in HandleCommandL() in AppUi Class.


    regards,
    eswar

  4. #4
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    50

    Re: softkey problem

    Thanks eswar,
    I did with first option u suggested,but that is giving undefined error for resource R_AVKON_SOFTKEYS_OK_CANCEL in
    iCba->SetCommandSetL( R_AVKON_SOFTKEYS_OK_CANCEL );
    I have added eikbtgpc.h and .rsg as well.
    Sohni.
    Last edited by sohnisheth; 2006-07-25 at 08:16.

  5. #5
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: softkey problem

    hi,

    plz check ur .rss file whether u have included this file
    #include <avkon.rsg>


    and also include ur myapp.rsg file in the cpp file in which ur getting this error
    and then rebuild will resolve ur issue.

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  6. #6
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    50

    Re: softkey problem

    Thanks mateen for your concern,
    I had put all those things.Now I got the thing,I was mistaken in keeping resourceID.
    That should be a command needed to be focused from .hrh.
    Thanks all.
    Sohni.

  7. #7
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: softkey problem

    For some odd reason my application leaves when i do..

    CEikButtonGroupContainer *cba = AppUi()->Cba();
    if ( cba )
    {
    cba->MakeVisible( ETrue );
    cba->DrawDeferred();
    }*/

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: softkey problem

    For some odd reason my application leaves at the line SetCommandSetL()

    CEikButtonGroupContainer *cba = AppUi()->Cba();
    if ( cba )
    {
    cba->SetCommandSetL(R_SOFTKEYS_MY_CBA);
    cba->DrawDeferred();
    }

    my rss file looks like this :-

    RESOURCE CBA R_SOFTKEYS_MY_CBA
    {
    buttons =
    {
    CBA_BUTTON
    {
    id=ECmdNext;
    txt = "Next";
    }
    } ;
    }

    And this is how the Resource for the view looks like :-

    RESOURCE MENU_BAR r_question_menubar
    {
    titles =
    {
    MENU_TITLE {menu_pane = r_question_menu;}
    };
    }


    // ---------------------------------------------------------
    //
    // r_question_menubar
    // Menu for "Question View"
    //
    // ---------------------------------------------------------
    //
    RESOURCE MENU_PANE r_question_menu
    {
    items =
    {
    MENU_ITEM
    {
    command = ECmdAnswer1;
    txt = "Show Options";
    },
    MENU_ITEM
    {
    command = ECmdAnswer2;
    txt = "Show Settings";
    },
    MENU_ITEM
    {
    command = ECmdAnswer;
    txt = "Answer";
    }
    };
    }

    RESOURCE AVKON_VIEW r_question_view
    {
    cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
    menubar=r_question_menubar;
    }

    I am totally lost..please can someone clarify the same..!

    Basically instead of the Exit on the Right softkey i want "Next"

    Cheers
    mayank

  9. #9
    Registered User
    Join Date
    Jul 2005
    Location
    Bengaluru, India
    Posts
    747

    Re: softkey problem

    I hope the issue is with your CBA resource:

    Use this resource:

    Code:
    RESOURCE CBA r_softkeys_options_next
    	{
    	buttons = 
    		{
    		CBA_BUTTON { id=EAknSoftkeyOptions; txt = "Options"; },
    		CBA_BUTTON { id=EYourAppCmdNext; txt = "Next"; }
    		};
    	}
    You may refer this thread from NewLC: How to change text of CBA buttons.

Similar Threads

  1. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  2. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36
  3. About 6230 Bt Problem
    By eerkek in forum Bluetooth Technology
    Replies: 17
    Last Post: 2005-02-08, 12:33
  4. setFullScreen and softkey problem on the 6600
    By paulstraylight2 in forum Mobile Java General
    Replies: 2
    Last Post: 2004-12-11, 16:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •