×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    1

    Question [Moved] Listbox use in reality vs. trivial examples

    This is a question about proper way of doing things with listboxes. I know how to add and remove items to/from a listbox, but what escapes me is how to actually accomplish something practical with it in practical way.

    Lets say I have a database that I use to create a CDesCArrayFlat of descriptors and hand that to listbox model with SetItemTextArray.

    Now I have a listbox that shows what is in the database, and I can select items from the listbox, but the only data I can get from the selected item is the index number in the listbox and the descriptor of of the item. Neither of those is directly usable, if I, for example, wanted to delete the selected item from the database.

    What I would like to do is stuff something like database row id's into the listbox model together with the descriptor array, so that I could map a selected item in the listbox to a specific database row. It's easy to implement that myself by just having a separate array of database row id's. But that seems like something the framework should do. Maybe I just haven't programmed symbian long enough. :-)

    I would assume that this is what some of the ListBoxModel classes are for, but I didn't even find a way to point listbox to use self defined ListBoxModel.

    Could somebody explain (or link to a good example code/document) how lisboxes ListBoxModels are supposed to be used outside tutorials.

    Thank you.

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Listbox use in reality vs. trivial examples

    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. ListBox Sample.
    By dotice in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-02-26, 13:08
  2. Listbox...
    By harsh_vs in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-02-15, 20:29
  3. Full screen listbox skin not rendered correctly
    By template60 in forum Symbian
    Replies: 2
    Last Post: 2007-09-11, 04:34
  4. ListBox Errors
    By javadi82 in forum Symbian User Interface
    Replies: 7
    Last Post: 2006-11-08, 13:29
  5. Using a "custom" listbox in mobile s60
    By ctpthanh in forum Symbian User Interface
    Replies: 4
    Last Post: 2005-04-17, 14:46

Posting Permissions

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