×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    80

    List Box Focus problem

    hi,

    i implimented a column listbox using CEikColumnListBox,

    but when i am using it SetFocus(EFalse) function it focus is changed, but the item of list box is still selected.


    Thanks
    Vickey

  2. #2
    Regular Contributor
    Join Date
    Dec 2007
    Location
    India
    Posts
    155

    Re: List Box Focus problem

    Hi try this code for moving the focus in listbox..


    TKeyResponse CContainerContainer::OfferKeyEventL(

    constTKeyEvent& aKeyEvent,

    TEventCode aType)

    {

    if (aType != EEventKey)

    {

    return EKeyWasNotConsumed;

    }

    // pass key press events to the listbox. It will typically

    // consume Up,Down and Selection keys.

    if (iListBox)

    {

    return iListBox->OfferKeyEventL(aKeyEvent, aType);

    }

    else

    {

    return EKeyWasNotConsumed;

    }

    }

    Regards
    Md.kashif

  3. #3
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    80

    Re: List Box Focus problem

    hi, thanks for the replay
    but the problem is not that, problem is that when i am calling the function SetFocus(EFalse) of ListBox the focus is lost but it still show the listbox as 1 selected item

  4. #4
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241

    Re: List Box Focus problem

    This works:

    Code:
    iFlags = iListBox->View()->ItemDrawer()->Flags();
            iFlags |= CListItemDrawer::EDisableHighlight;
    To disable Listboxes highlighting:

    Code:
    iListBox->ItemDrawer()->SetFlags(iFlags)

    To enable again

    Code:
    iListBox->ItemDrawer()->ClearFlags(iFlags);


    Regards,
    Andi

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: List Box Focus problem

    I would have also tried redrawing after SetFocus.

Similar Threads

  1. List Box Problem
    By amitaggarwal in forum Symbian User Interface
    Replies: 47
    Last Post: 2012-03-02, 09:37
  2. How to call a List Box...
    By harsh_vs in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-02-14, 22:02
  3. column list box not shown correctly in landscape mode.
    By praveena_R in forum Symbian User Interface
    Replies: 3
    Last Post: 2007-12-14, 10:14
  4. add the contents to list box and display it.
    By manjunaths in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-12-11, 08:43
  5. how to move from list box to text editor on dialog box
    By manjunaths in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-12-07, 10:13

Posting Permissions

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