Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor aluzi's Avatar
    Join Date
    Mar 2008
    Posts
    77
    look:

    MDesCArray* textArray =iListBox->Model()->ItemTextArray();
    CDesCArray* itemList = static_cast<CDesCArray*>(textArray);
    (*itemList)[0] = "0\tnew text\tnew text\t";

    compile error, it seem that listbox item text can not modify, but if I real want to change item text, how I can do?

  2. #2
    Nokia Developer Moderator Symbian_Neil's Avatar
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,161
    Quote Originally Posted by aluzi View Post
    look:

    MDesCArray* textArray =iListBox->Model()->ItemTextArray();
    CDesCArray* itemList = static_cast<CDesCArray*>(textArray);
    (*itemList)[0] = "0\tnew text\tnew text\t";

    compile error, it seem that listbox item text can not modify, but if I real want to change item text, how I can do?
    Have you checked the listbox example ?
    - Neil R.Bhasme -

    Twitter: @Symbian_Neil

  3. #3
    Regular Contributor zesky's Avatar
    Join Date
    Jun 2007
    Posts
    107
    In my opinion, you should check the example first.
    A list box can own or not own a list of item text and after the text modified, you need to Update the list to display the correct item.
    -------
    zesky
    http://symbian-security.cn

  4. #4
    Regular Contributor aluzi's Avatar
    Join Date
    Mar 2008
    Posts
    77
    Quote Originally Posted by Symbian_Neil View Post
    Have you checked the listbox example ?
    The sample you gave dose not mention how to chang item text in list box.

    But I found another sample, and I know how to do it:
    1 first delete the item
    2 and then insert an new item at same index

    So, I can change item text now, and thank you!

  5. #5
    Regular Contributor Mr.Y's Avatar
    Join Date
    Mar 2008
    Posts
    156
    Quote Originally Posted by aluzi View Post
    But I found another sample, and I know how to do it:
    1 first delete the item
    2 and then insert an new item at same index
    not optimal way... ;-)

  6. #6
    Regular Contributor aluzi's Avatar
    Join Date
    Mar 2008
    Posts
    77
    Could you tell me the optimal way? I really want to know,thanks!

  7. #7
    Registered User sinhashivam's Avatar
    Join Date
    Apr 2005
    Location
    Pune
    Posts
    115
    Well I guess there are two ways out:

    1. Delete the item, add new item and re-draw the list

    2. Derive the listbox to create your custom list box and in the DrawActualItem() update the text..

    Hope it helps.

    Shivam

Similar Threads

  1. Update listbox item
    By fuhrer in forum Symbian C++
    Replies: 4
    Last Post: 2007-10-03, 16:31
  2. Enabling marquee in listbox item
    By toinks in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-11-02, 10:37
  3. Change icon in listbox
    By ninidotnet in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-10-12, 02:57
  4. Can you change color of 6280 active standby text?
    By marc3381 in forum General Development Questions
    Replies: 0
    Last Post: 2006-06-27, 12:03
  5. listbox item height...
    By yahyah_yy in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-05-25, 16:28

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