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
RE: changing cba resource in popup list
2002-10-28, 11:44#2
Two possibilities spring to mind:
1) dirty hack:
RESOURCE CBA r_popuplist_A_B
{
buttons =
{
CBA_BUTTON {
id = EAknSoftkeySelect;
txt = "Option A";
},
CBA_BUTTON {
id = EAknSoftkeyBack;
txt = "Option B"; }
};
}
yuk! (but works!)
or
2)
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
Graeme
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