×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    108

    Question Blank Listbox.......?

    Hi,

    I have created a database of 10 items.
    I need to display these items in a list box using CAknSingleStyleListBox.
    Problem::I am getting the listbox ,but the text is not displayed.

    If i am using CAknSingleNumberStyleListBox,first letter of the item will be displayed in the first column(number column),second column will be blank.


    How can i solve this problem..?
    Pls help me.
    Thanks in advance.

    Remesh.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: Blank Listbox.......?

    you need to add tab characters "\t" between the columns, otherwise the listbox will noty know which data should go to which column in it.

  3. #3
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    108

    Question Re: Blank Listbox.......?

    Hi symbianyucca,
    Thank you very much for u r quick response.

    Still i am confused with this dynamic list box.

    How do i separate the columns ,Whether i need to specify the format?

    remesh.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: Blank Listbox.......?

    you just separate the string parts with the tab char, like
    "1\tsecond comun text" style. Just try it and you'll see how it works.

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

    Re: Blank Listbox.......?

    If you search for CAknSingleStyleListBox in the SDK Help, there will be a hit saying "Listbox Item Layouts". You may want to check that.

  6. #6
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    108

    Re: Blank Listbox.......?

    Hi wizard_hu_,
    Thanks for u r reply.

    but my problem is not yet solved.

    my code is:

    Code:
    CDesCArrayFlat* resultArray =
            new (ELeave)CDesC16ArrayFlat(KArrayGranularity);
    
    resultArray->AppendL(sourceRow.Mid(startPos, endPos-startPos));
    where sourceRow.Mid(startPos, endPos-startPos) is the name of first item ,taken from the database.

    How do i place a tab ("\t") infront of the "sourceRow.Mid(startPos, endPos-startPos"..?

    That is i need to place the item name instead of "%s" in the
    Code:
    AppendL(_L("\t%s\t\t"));
    awaiting quick reply
    thanks in advance
    remesh

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Blank Listbox.......?

    Do not hesitate checking TDes16::Format method in the SDK Help. You may also benefit from searching for format string syntax too, in Symbian %s and %S have different meanings.

Similar Threads

  1. problem in ListBox
    By aditighosal in forum Symbian
    Replies: 8
    Last Post: 2008-07-16, 20:01
  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. Query ~ Listbox | functional but no text
    By series60nubee in forum Symbian
    Replies: 5
    Last Post: 2006-03-24, 06:09
  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
  •  
×