Discussion Board

Results 1 to 13 of 13

Hybrid View

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    why HandleListBoxEventL() is not get called for EAknListBoxMultiselectionList type li

    I have following lines to create a multi-selection listbox

    Code:
    
    void CTestList::MakeListBoxL()
    	{
    	iListBox = new ( ELeave ) CAknSingleGraphicStyleListBox(); 
    	iListBox->ConstructL( this, EAknListBoxMultiselectionList| EAknListBoxLoopScrolling ); 
    	
    	iListBox->SetContainerWindowL( *this );
    	
    	iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
    	iListBox->CreateScrollBarFrameL( ETrue );
    	iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
    
    	iListBox->SetListBoxObserver( this );
    	
    	SetupListBoxIconsL();
    	
    	iListBox->SetFocus( ETrue );
    	}

    But when I select an item in the listbox, HandleListBoxEventL() is not get called. What might be the reason for that? Thanks

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Gurgaon,India
    Posts
    4,112

    Re: why HandleListBoxEventL() is not get called for EAknListBoxMultiselectionList typ

    Is this class TestList derived from CCoentrol?, if yes then is it added on stack? Also you can check if OfferKeyEventL() gets called by making any key event on the list.

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    Re: why HandleListBoxEventL() is not get called for EAknListBoxMultiselectionList typ

    Thanks vineet for your reply.

    Quote Originally Posted by vineet.jain View Post
    Is this class TestList derived from CCoentrol?, if yes then is it added on stack? Also you can check if OfferKeyEventL() gets called by making any key event on the list.
    yes, it is derived from CCoeControl..
    Code:
    class CTestList : public CCoeControl, public MEikListBoxObserver
    {
    };
    It has been added to stack by calling AddToStackL() and it's OfferKeyEventL() gets called. I really don't understand why HandleListBoxEventL() is not get called. Is there something special to do with EAknListBoxMultiselectionList type? thanks

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,183

    Re: why HandleListBoxEventL() is not get called for EAknListBoxMultiselectionList typ

    there should be no magic there really. Anyway, how is the selection handled ? the listbox event should be claled when you click the listbox, and not if you just select the item some other way.

    Also Newer have had this problem, and would not think the fix suggested is required, but can you try what is suggested at: http://stackoverflow.com/questions/6...ist-5th-ed-sdk

  5. #5
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    Re: why HandleListBoxEventL() is not get called for EAknListBoxMultiselectionList typ

    Thanks symbianyucca for reply. If I just replace EAknListBoxMultiselectionList with EAknListBoxSelectionList everything works perfectly. So I just get confused what's the matter with EAknListBoxMultiselectionList ?

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,183

    Re: why HandleListBoxEventL() is not get called for EAknListBoxMultiselectionList typ

    Quote Originally Posted by slinx View Post
    Thanks symbianyucca for reply. If I just replace EAknListBoxMultiselectionList with EAknListBoxSelectionList everything works perfectly. So I just get confused what's the matter with EAknListBoxMultiselectionList ?
    that behavior beats me as well.. I propably did not really use the EAknListBoxMultiselectionList too much ever, so haven't seen such a behaviour..

Similar Threads

  1. HandleListBoxEventL not being called when enter key pressed
    By TorrinLynn in forum Symbian User Interface
    Replies: 17
    Last Post: 2010-08-06, 03:34
  2. Replies: 3
    Last Post: 2009-06-01, 09:43
  3. Replies: 9
    Last Post: 2009-01-27, 14:55
  4. HandleListBoxEventL/HandleControlEventL not being called
    By nimco in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-11-11, 13:58
  5. EAknListBoxMultiselectionList
    By hanymt in forum Symbian
    Replies: 0
    Last Post: 2006-11-15, 11:14

Posting Permissions

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