×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    338

    How to update CAknSingleStyleListBox with changed text array ?

    hi,
    I am using CAknSingleStyleListBox and a CAknSearchField is added with it... it works fine as this was from an example from the wiki.. I have some changes in the example afterwards... like i am trying to reload the text array each time the findbox text changes. I did so successfully. But when i try to update the listbox with the reloaded text array it does not do that instantly...
    I am describing the current situation.
    -- at first my list box is empty
    -- when user type a character in findbox, for example a '3' the the text array is uploaded with a new element.
    -- I used iListBox->Model()->SetItemTextArray(MyArray); where MyArray is updated just now.. then i called sizeChanged, drawNow but i got no effect in the listbox
    -- At this moment if i press backspace then the updated listbox is shown... though it should have been shown before backspace is pressed. That means i am one key back already and i could not update the listbox properly...

    Is there any precondition to comeback from this situation ? Please help me..

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

    Re: How to update CAknSingleStyleListBox with changed text array ?

    Have you called HandleItemAdditionL() method? HandleItemAdditionL() method is called to handle the addition of the items and redrawing of the listbox.

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    338

    Re: How to update CAknSingleStyleListBox with changed text array ?

    Quote Originally Posted by slinx View Post
    Have you called HandleItemAdditionL() method? HandleItemAdditionL() method is called to handle the addition of the items and redrawing of the listbox.
    Thank you. It works.. :)

  4. #4
    Registered User
    Join Date
    Feb 2011
    Posts
    338

    Re: How to update CAknSingleStyleListBox with changed text array ?

    One more thing. When there is no data in the listbox it shows "(no data)" in the listbox background. How to change this text ?

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

    Re: How to update CAknSingleStyleListBox with changed text array ?

    Quote Originally Posted by Md. Kayesh View Post
    One more thing. When there is no data in the listbox it shows "(no data)" in the listbox background. How to change this text ?
    You can use this

    Code:
    _LIT(KNoData, " ");
    iMyListBox->View()->SetListEmptyTextL(KNoData);

  6. #6
    Registered User
    Join Date
    Feb 2011
    Posts
    338

    Re: How to update CAknSingleStyleListBox with changed text array ?

    great !! thanks a lot

Similar Threads

  1. Replies: 8
    Last Post: 2009-05-19, 04:37
  2. textfield text changed event?
    By mikecotic in forum Mobile Java General
    Replies: 4
    Last Post: 2008-11-12, 19:29
  3. Update Error: UID of the application is Changed
    By jupitar in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 4
    Last Post: 2008-11-12, 04:34
  4. Replies: 3
    Last Post: 2008-09-04, 11:53
  5. CaknSingleStyleListBox and text length
    By Jeepy in forum Symbian
    Replies: 0
    Last Post: 2003-02-07, 12:56

Posting Permissions

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