Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003

    Setting Listbox - PopupSettingItem

    Hi everybody.
    I have a CAknSettingItemList-based listbox, and I need to add items to CAknEnumeratedTextPopupSettingItem field dynamically. If I define an empty array in the resource file, and then in PostLayoutDynInitL() dynamically add items to popup list, my program panics, because iSelectedItem becomes -1. I can't change its value, because it is private. But, if I edit aknsettingitemlist.h, make it public and set iSelectedItem manually to 0, it works fine. Is there any normal way to work it out? Why I am not allowed set its value? Or this class is only designed to be created from resources only?
    I also tried to leave one item in the resource file and then delete it and add others dynamically, but this is a bad solution, because when first displayed the field keeps the old default active value (resource), but not added after construction.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003

    Is this any help?

    I don't know that PostLayoutDynInit() is the right place to add items dynamically. I think you need to overide CAknEnumeratedTextPopupSettingItem::CompleteConstructionL().

    I found this post a big help:


    Regards, Mark.

Posting Permissions

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