×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Super Contributor
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546

    Move items in listbox

    Hello, I am making an application that contains list of items which user can:
    1. Re-arrange by moving items within list
    2. Do free text search
    3. Select multiple items and perform a common operation on selected items
    All above features are available in phone book of Nokia E61i
    I used CAknSingleStyleListBox (EAknListBoxMarkableList) and CAknSearchField But I don't know how to add feature of moving items within list. Please help. Here is my code:

    Code:
    ptrAknSingleStyleListBox = new (ELeave)CAknSingleStyleListBox();
    ptrAknSingleStyleListBox->ConstructL(this, EAknListBoxMarkableList);
    
    ptrAknSingleStyleListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
    ptrAknSingleStyleListBox->CreateScrollBarFrameL(ETrue);
    ptrAknSingleStyleListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
    ptrAknSingleStyleListBox->SetRect(Rect);
    ptrAknSingleStyleListBox->SetItemHeight(5);
    
    CAknFilteredTextListBoxModel *ptrAknFilteredTextListBoxModel = STATIC_CAST(CAknFilteredTextListBoxModel *, ptrAknSingleStyleListBox->Model());
    ptrAknSearchField = CAknSearchField::NewL(*this, CAknSearchField::ESearch, NULL, 64);
    CleanupStack::PushL(ptrAknSearchField);
    ptrAknFilteredTextListBoxModel->CreateFilterL(ptrAknSingleStyleListBox, ptrAknSearchField);
    CleanupStack::Pop(ptrAknSearchField);
    
    ptrAknSingleStyleListBox->SetListBoxObserver(this);
    
    SizeChanged();
    ptrAknSingleStyleListBox->ActivateL();

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: Move items in listbox

    Hi arpit,

    I am not sure but it may help you.

    just go through this example

    \Symbian\8.0a\S60_2nd_FP2_CW\Series60Ex\listbox

    Thanks

  3. #3
    Super Contributor
    Join Date
    May 2003
    Location
    Vancouver, Canada
    Posts
    985

    Re: Move items in listbox

    You can delete the current item and then insert it at the new position.
    Antony Pranata
    http://www.antonypranata.com/
    http://www.s60tips.com/

Similar Threads

  1. Any idea on how to set the listbox items in different height :)
    By ClickLee in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-09-01, 16:24
  2. Adding Items to Custom ListBox at runtime
    By nickyc in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-05-01, 14:15
  3. How to modify listbox items in a findbox view?
    By inc0gn1t007 in forum Symbian User Interface
    Replies: 3
    Last Post: 2006-05-03, 17:53
  4. listbox items not visible........
    By Neelakantan in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-01-12, 05:29
  5. Replies: 3
    Last Post: 2005-01-12, 03:03

Posting Permissions

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