Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor pistha's Avatar
    Join Date
    Apr 2006
    Posts
    105
    Hi All,
    I am using CAknMarkableListDialog class, from this i can able to show the list mark and unmark also it's showing fine.But user marked any one iteam and user closed the dialog and again opened the list and seen the list the marked iteam is showing withou mark icon.How to show the user the marked iteam as a marked iteam.If any one know reply me.



    CDesCArrayFlat* items = new (ELeave) CDesCArrayFlat(10);
    TBufC<50> aString;
    for (TInt i = 1; i< 5; i++)
    {
    TBuf<50> lName;
    TInt lMarkIndex = 0;
    lName.Copy(_L("AccessPoint"));
    aString.Des().Format(_L("%d\t%S"),i,&lName);
    items->AppendL(aString);
    }

    CleanupStack::PushL(items);
    TInt openedItem=1;
    MDesCArray *arrayOfItems = items;
    CArrayFix<TInt> *selectedItems = new (ELeave)CArrayFixFlat<TInt>(4);
    CleanupStack::PushL(selectedItems);


    CAknMarkableListDialog *lDialogPtr = CAknMarkableListDialog::NewL(openedItem,
    selectedItems,
    arrayOfItems,
    R_MARKABLE_MENUBAR);



    TInt lResult = lDialogPtr->ExecuteLD(R_MARKABLE_DIALOG);

  2. #2
    Nokia Developer Moderator skumar_rao's Avatar
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968
    CArrayFix<TInt> *selectedItems Item member of your Class. not memebr of Function.

  3. #3
    Regular Contributor pistha's Avatar
    Join Date
    Apr 2006
    Posts
    105
    Hi skumar_rao,
    Thanks for u r reply.I am able to show the list i am getting the selected items also,but how to show the premarked items.

  4. #4
    Nokia Developer Moderator skumar_rao's Avatar
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968
    Try Populating selectedItems

  5. #5
    Regular Contributor pistha's Avatar
    Join Date
    Apr 2006
    Posts
    105
    I am getting selected items also i.e not problem.I need to show the premarked(icon on items) items as it is when user open the dialog.

  6. #6
    Nokia Developer Moderator skumar_rao's Avatar
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968
    what i meant is

    Code:
    CArrayFix<TInt> *selectedItems = new (ELeave)CArrayFixFlat<TInt>(4);
    CleanupStack::PushL(selectedItems);
    // Add or Append to selectedItems with Items you want to be selected
    CAknMarkableListDialog *lDialogPtr = CAknMarkableListDialog::NewL(openedItem,
    selectedItems,
    arrayOfItems,
    R_MARKABLE_MENUBAR);

  7. #7
    Regular Contributor pistha's Avatar
    Join Date
    Apr 2006
    Posts
    105
    ya i append list using CEikListBox like below,it's crashing.I mention the crashing line also.if u know reply me.

    CDesCArrayFlat* items = new (ELeave) CDesCArrayFlat(10);
    TBufC<50> aString;
    for (TInt i = 1; i< 5; i++)
    {
    TBuf<50> lName;
    TInt lMarkIndex = 0;
    lName.Copy(_L("AccessPoint"));
    aString.Des().Format(_L("%d\t%S"),i,&lName);
    items->AppendL(aString);
    }
    CleanupStack::PushL(items);
    TInt openedItem=1;
    MDesCArray *arrayOfItems = items;
    CArrayFix<TInt> *selectedItems = new (ELeave)CArrayFixFlat<TInt>(4);
    CleanupStack::PushL(selectedItems);

    selectedItems->AppendL(1);
    CEikListBox* lCEikListBoxPtr= new(ELeave)CEikListBox;
    lCEikListBoxPtr->SetSelectionIndexesL(selectedItems);//here it's crashing

    CAknMarkableListDialog *lDialogPtr = CAknMarkableListDialog::NewL(openedItem,
    selectedItems,
    arrayOfItems,
    R_MARKABLE_MENUBAR);

Similar Threads

  1. CAknMarkableListDialog giving Problem
    By pavan in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-10-08, 07:56
  2. CAknMarkableListDialog - TInt aOkMenuBarResourceId in constructor
    By eekisa in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-05-18, 07:36
  3. CAknMarkableListDialog panics with USER 0
    By grapentin in forum Symbian User Interface
    Replies: 8
    Last Post: 2007-03-01, 13:31
  4. CAknMarkableListDialog: notification of changes
    By ian.coopyrin in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-08-01, 18:56
  5. How to use CAknMarkableListDialog HELP
    By rmuralidharan in forum Symbian C++
    Replies: 1
    Last Post: 2003-08-06, 09:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved