Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003

    changing cba resource in popup list?plz reply again. answer is not working

    dear nokia people,
    i want to change the label of cba button in popup list . i am using my own cba resource to achieve the same.but when i click on any of the button ,executeLD doesnt return anything.that menas it doesnt go the line after executeLd().so cant we use custom cba instead of system defined resource. plz reply it asap. i have already posted same question earlier but no concrete answer has been received so far.so plz reply asap

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003

    RE: changing cba resource in popup list


    U can use the following code to create ur own CBA buttons

    RESOURCE CBA r_cba_button1_button2
    buttons =
    CBA_BUTTON {id=EButton1;
    txt = "Button1";},
    CBA_BUTTON {id=EButton2;
    txt = "Button2"; }

    then in your view:-


    Note remmember to create Enums for them in the .hrh file of ur application. Then handle those enums in the HandleCommandL() function of ur view class.


  3. #3
    Regular Contributor
    Join Date
    Mar 2003

    RE: changing cba resource in popup list?plz reply again. answer is not working

    Two possibilities spring to mind:
    1) dirty hack:
    RESOURCE CBA r_popuplist_A_B
    buttons =
    id = EAknSoftkeySelect;
    txt = "Option A";
    id = EAknSoftkeyBack;
    txt = "Option B"; }
    yuk! (but works!)
    Derive from CAknPopupList and override the ProcessCommandL to handle your own commands. I'll elaborate...
    Create new class
    class CMyPopupList : public CAknPopupList
    in the definition
    void CMyPopupList::ConstructL(CEikListBox* aListBox, TInt aCbaResource, AknPopupLayouts::TAknPopupLayouts aType)
    CAknPopupList::ConstructL(aListBox, aCbaResource, aType);
    void CMyPopupList::ProcessCommandL(TInt aCommandId)
    AttemptExitL(aCommandId==EPopupListOptionA ? ETrue : EFalse);
    The constructL makes sure the base class is constructed correctly and the ProcessCommandL handles whatever commandIds you would like.
    Hope that helps
    PS Did you know that there is an R_AVKON_SOFTKEYS_SELECT_BACK. I noticed from your previous post that you had R_SOFTKEYS_SELECT_BACK

Posting Permissions

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